mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-08 22:03:29 +02:00
docs: document preserve_host_header with policy routes to static ip (#1024)
Fixes #1012
This commit is contained in:
parent
e27ee4dd32
commit
65150f2c3d
2 changed files with 11 additions and 0 deletions
|
@ -87,6 +87,9 @@ type Policy struct {
|
||||||
|
|
||||||
// PreserveHostHeader disables host header rewriting.
|
// PreserveHostHeader disables host header rewriting.
|
||||||
//
|
//
|
||||||
|
// This option only takes affect if the destination is a DNS name. If the destination is an IP address,
|
||||||
|
// use SetRequestHeaders to explicitly set the "Host" header.
|
||||||
|
//
|
||||||
// https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_set_header
|
// https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_set_header
|
||||||
PreserveHostHeader bool `mapstructure:"preserve_host_header" yaml:"preserve_host_header,omitempty"`
|
PreserveHostHeader bool `mapstructure:"preserve_host_header" yaml:"preserve_host_header,omitempty"`
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,14 @@ In `0.9.0`:
|
||||||
option httpchk GET /ping HTTP/1.1\r\nHost:pomerium
|
option httpchk GET /ping HTTP/1.1\r\nHost:pomerium
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### preserve_host_header option
|
||||||
|
|
||||||
|
With this release, Pomerium uses an embedded envoy proxy instead hand-written one. Thus, we defer the preserve host header
|
||||||
|
functionality to [envoy's auto_host_rewrite](https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#envoy-v3-api-field-config-route-v3-routeaction-auto-host-rewrite),
|
||||||
|
which does not affect if the policy routes to a static IP.
|
||||||
|
|
||||||
|
To preserve 0.8.x behavior, you can use the `set_request_headers` option to explicitly set the Host header.
|
||||||
|
|
||||||
# Since 0.8.0
|
# Since 0.8.0
|
||||||
|
|
||||||
## Breaking
|
## Breaking
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue