all repos — website @ 1d9d4fc9812f9eb15e78398340053afb32a3c55a

My website

fix logging of host header why on earth does net/http **remove** the host header and not make it clear? It's only "documented" in the comments of the fields of the Request struct and not even hinted at in the Header() documentation

Alan Pearce
commit

1d9d4fc9812f9eb15e78398340053afb32a3c55a

parent

3e8f63bc06639d4ce2154b65da52c175fe31652f

1 file changed, 1 insertion(+), 1 deletion(-)

changed files
M internal/server/logging.gointernal/server/logging.go
@@ -32,7 +32,7 @@ scheme := r.Header.Get("X-Forwarded-Proto")
if scheme == "" { scheme = "http" } - host := r.Header.Get("Host") + host := r.Host if host == "" { host = opts.defaultHostname }