Add a mention for the host header in metrics headers labels doc
Co-authored-by: Baptiste Mayelle <baptiste.mayelle@traefik.io>
This commit is contained in:
parent
0b4c582088
commit
8faed97e74
1 changed files with 9 additions and 1 deletions
|
@ -227,4 +227,12 @@ The following metric is produced :
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
traefik_entrypoint_requests_total{code="200",entrypoint="web",method="GET",protocol="http",useragent="foobar"} 1
|
traefik_entrypoint_requests_total{code="200",entrypoint="web",method="GET",protocol="http",useragent="foobar"} 1
|
||||||
```
|
```
|
||||||
|
|
||||||
|
!!! info "`Host` header value"
|
||||||
|
|
||||||
|
The `Host` header is never present in the Header map of a request, as per go documentation says:
|
||||||
|
// For incoming requests, the Host header is promoted to the
|
||||||
|
// Request.Host field and removed from the Header map.
|
||||||
|
|
||||||
|
As a workaround, to obtain the Host of a request as a label, one should use instead the `X-Forwarded-For` header.
|
||||||
|
|
Loading…
Reference in a new issue