Apply suggestions from code review

Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
This commit is contained in:
Francis Lavoie 2020-12-02 13:37:49 -05:00 committed by GitHub
parent d406814cfb
commit 43c6d77a56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -249,16 +249,16 @@ Configure some transport options:
reverse_proxy https://example.com { reverse_proxy https://example.com {
transport http { transport http {
dial_timeout 2s dial_timeout 2s
tls_timeout 2s tls_timeout 2s
} }
} }
``` ```
Strip a path prefix then proxy with a new path: Replace a path prefix before proxying:
```caddy-d ```caddy-d
handle_path /prefix/* { handle_path /old-prefix/* {
rewrite * /foo{path} rewrite * /new-prefix{path}
reverse_proxy localhost:9000 reverse_proxy localhost:9000
} }
``` ```