mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-01 14:47:38 +00:00
lib/httpserver: add new X-Server-Hostname header instead of overwriting already exsiting header
This makes possible tracking origins of chained requests over multiple hops.
This commit is contained in:
parent
f2d5c4e2d0
commit
afec68ad13
1 changed files with 1 additions and 1 deletions
|
@ -221,7 +221,7 @@ func handlerWrapper(s *server, w http.ResponseWriter, r *http.Request, rh Reques
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
w.Header().Set("X-Server-Hostname", hostname)
|
w.Header().Add("X-Server-Hostname", hostname)
|
||||||
requestsTotal.Inc()
|
requestsTotal.Inc()
|
||||||
if whetherToCloseConn(r) {
|
if whetherToCloseConn(r) {
|
||||||
connTimeoutClosedConns.Inc()
|
connTimeoutClosedConns.Inc()
|
||||||
|
|
Loading…
Reference in a new issue