Fix incorrect reverse proxy docs

This commit is contained in:
Patrick Koenig 2023-08-26 23:29:30 -07:00
parent 618e4e559e
commit 42e351173b
No known key found for this signature in database
2 changed files with 9 additions and 11 deletions

View file

@ -71,11 +71,9 @@ reverse_proxy <upstreams...> {
# On a successful response, copy response headers
@good status 2xx
handle_response @good {
request_header {
# for example, for each copy_headers field...
Remote-User {rp.header.Remote-User}
Remote-Email {rp.header.Remote-Email}
}
request_header Remote-User {http.reverse_proxy.header.Remote-User}
request_header Remote-Email {http.reverse_proxy.header.Remote-Email}
}
}
```

View file

@ -629,9 +629,9 @@ Additionally, inside `handle_response`, two special handler directives may be us
Three placeholders will be made available within the `handle_response` routes:
- `{rp.status_code}` The status code from the backend's response.
- `{rp.status_text}` The status text from the backend's response.
- `{rp.header.*}` The headers from the backend's response.
- `{http.reverse_proxy.status_code}` The status code from the backend's response.
- `{http.reverse_proxy.status_text}` The status text from the backend's response.
- `{http.reverse_proxy.header.*}` The headers from the backend's response.
#### Response matcher
@ -728,7 +728,7 @@ reverse_proxy localhost:8080 {
@accel header X-Accel-Redirect *
handle_response @accel {
root * /path/to/private/files
rewrite * {rp.header.X-Accel-Redirect}
rewrite * {http.reverse_proxy.header.X-Accel-Redirect}
method * GET
file_server
}