Headers Settings
This reference covers all of Pomerium's Headers Settings:
- Host Header Settings
- Set Request Headers
- Remove Request Headers
- Set Response Headers
- Rewrite Response Headers
Host Header Settings
By default, Pomerium will set the Host
header of an upstream request according to the host specified in the To URL for the route.
(Strictly speaking, the Host
header is used only with HTTP/1.1. For HTTP/2 and HTTP/3 the :authority
pseudo-header is used instead. These settings affect both identically.)
You can change how Pomerium sets this header using the following settings:
1. Preserve Host Header
preserve_host_header
passes the Host header from the incoming request to the upstream service, instead of the host from the route's To URL.
This is like the Apache httpd ProxyPreserveHost directive.
2. Host Rewrite
host_rewrite
rewrites the Host header to a fixed value.
3. Host Rewrite Header
host_rewrite_header
rewrites the Host header using the value of some other header from the incoming request. For example:
host_rewrite_header: X-My-Host
For an incoming request with the header X-My-Host: foo.example.com
, this would rewrite the Host header to foo.example.com
.