From 6e210f14450dcbc0b023c0421f1e4b8c3980eb91 Mon Sep 17 00:00:00 2001 From: Martin Plattner Date: Thu, 23 Jul 2020 19:27:32 +0200 Subject: [PATCH] fix docs for Map* addons --- docs/src/content/overview-features.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/src/content/overview-features.md b/docs/src/content/overview-features.md index 36fa9fe84..6723c6589 100644 --- a/docs/src/content/overview-features.md +++ b/docs/src/content/overview-features.md @@ -69,10 +69,10 @@ that additionally constrains which requests will be redirected. Pattern | Description ------- | ----------- -`\|example.com/main.js\|~/main-local.js` | Replace `example.com/main.js` with `~/main-local.js`. -`\|example.com/static\|~/static` | Replace `example.com/static/foo/bar.css` with `~/static/foo/bar.css`. -`\|example.com/static/foo\|~/static` | Replace `example.com/static/foo/bar.css` with `~/static/bar.css`. -`\|~m GET\|example.com/static\|~/static` | Replace `example.com/static/foo/bar.css` with `~/static/foo/bar.css` (but only for GET requests). +`|example.com/main.js|~/main-local.js` | Replace `example.com/main.js` with `~/main-local.js`. +`|example.com/static|~/static` | Replace `example.com/static/foo/bar.css` with `~/static/foo/bar.css`. +`|example.com/static/foo|~/static` | Replace `example.com/static/foo/bar.css` with `~/static/bar.css`. +`|~m GET|example.com/static|~/static` | Replace `example.com/static/foo/bar.css` with `~/static/foo/bar.css` (but only for GET requests). ### Details @@ -127,6 +127,7 @@ The substituted URL is fetched instead of the original resource and the corresponding HTTP response is returned transparently to the client. Note that if the original destination uses HTTP2, the substituted destination needs to support HTTP2 as well, otherwise the substituted request may fail. +As a workaround you can start mitmproxy with the `--no-http2` flag to disable HTTP2. `map_remote` patterns look like this: ```