Merge pull request #4102 from mplattner/fix-map-addons-docs

fix docs for Map* addons
This commit is contained in:
Maximilian Hils 2020-07-27 15:28:08 +02:00 committed by GitHub
commit abb8ccc210
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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:
```