mirror of https://github.com/docker/docs.git
Add documentation for HRM's X-Forwarded-For header
This commit is contained in:
parent
dd15ca212a
commit
ed7a3b6aa3
|
@ -129,6 +129,7 @@ These keys are supported:
|
|||
| internal_port | yes, if the port published multiple ports | port-number | The internal port to use for the service |
|
||||
| sticky_sessions | no | cookie-name | Always route a user to the same service, using HTTP cookies. This option can't be used with HTTPS routes |
|
||||
| redirect | no | http://domain-name, or sni://domain-name | Redirect incoming requests to another route using an HTTP 301 redirect |
|
||||
| include_forwarded_for | no | true | If present, include the X-Forwarded-For header in requests |
|
||||
|
||||
|
||||
### Sticky sessions
|
||||
|
@ -167,6 +168,10 @@ com.docker.ucp.mesh.http.1=external_route=http://example.org,redirect=https://ex
|
|||
com.docker.ucp.mesh.http.2=external_route=sni://example.org
|
||||
```
|
||||
|
||||
### X-Forwarded-For header
|
||||
|
||||
Because HRM forwards traffic to your application, the requests that your application receives will all appear to come from HRM's IP address. If you add `include_forwarded_for=true` in the HRM label for your service, HRM will add an HTTP header to every request called `X-Forwarded-For` that will contain the IP address that the original request came from. Note that this feature will only work if your external_route field begins with `http://`.
|
||||
|
||||
### Keep services isolated
|
||||
|
||||
If you want to keep the services from sharing the same network, before
|
||||
|
|
Loading…
Reference in New Issue