From e1c0c0b20c7a22670098fd0a0d1469e362623fb1 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 24 Jan 2022 22:05:11 +0100 Subject: [PATCH] internal: don't override server header Signed-off-by: Jens Langhammer --- internal/outpost/proxyv2/proxyv2.go | 2 +- internal/web/proxy.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/outpost/proxyv2/proxyv2.go b/internal/outpost/proxyv2/proxyv2.go index c890077ce..cf98d3bbb 100644 --- a/internal/outpost/proxyv2/proxyv2.go +++ b/internal/outpost/proxyv2/proxyv2.go @@ -46,7 +46,7 @@ func NewProxyServer(ac *ak.APIController, portOffset int) *ProxyServer { rootMux.Use(func(h http.Handler) http.Handler { return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { h.ServeHTTP(rw, r) - rw.Header().Set("Server", "authentik_proxy2") + rw.Header().Set("X-Powered-By", "authentik_proxy2") }) }) diff --git a/internal/web/proxy.go b/internal/web/proxy.go index 36234724c..44cb26cdf 100644 --- a/internal/web/proxy.go +++ b/internal/web/proxy.go @@ -74,6 +74,6 @@ func (ws *WebServer) proxyErrorHandler(rw http.ResponseWriter, req *http.Request } func (ws *WebServer) proxyModifyResponse(r *http.Response) error { - r.Header.Set("server", "authentik") + r.Header.Set("X-Powered-By", "authentik") return nil }