From 3e16defa4e86c12b21c5e22e4b9d3d92bdc16406 Mon Sep 17 00:00:00 2001 From: Victor Nogueira Date: Sat, 9 Jul 2022 15:23:34 +0300 Subject: [PATCH] Remove the port number from "X-Forwarded-Host" header as it's is already defined in "X-Forwarded-Port" --- components/ws-proxy/pkg/proxy/routes.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/ws-proxy/pkg/proxy/routes.go b/components/ws-proxy/pkg/proxy/routes.go index 8bc429dad47999..c2e3269714485f 100644 --- a/components/ws-proxy/pkg/proxy/routes.go +++ b/components/ws-proxy/pkg/proxy/routes.go @@ -376,10 +376,9 @@ func installWorkspacePortRoutes(r *mux.Router, config *RouteHandlerConfig, infoP r.Header["Sec-WebSocket-"+name] = values } } - portString := "443" r.Header.Add("X-Forwarded-Proto", "https") - r.Header.Add("X-Forwarded-Host", r.Host+":"+portString) - r.Header.Add("X-Forwarded-Port", portString) + r.Header.Add("X-Forwarded-Host", r.Host) + r.Header.Add("X-Forwarded-Port", "443") proxyPass( config, infoProvider,