From 0b9eaba921ef0ca3d79d5fe06a21fb719293cdca Mon Sep 17 00:00:00 2001 From: Pavel Tumik <18602811+sagor999@users.noreply.github.com> Date: Tue, 19 Apr 2022 00:09:15 +0000 Subject: [PATCH] WIPwip --- components/ws-proxy/pkg/proxy/workspacerouter.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/ws-proxy/pkg/proxy/workspacerouter.go b/components/ws-proxy/pkg/proxy/workspacerouter.go index 6aedb763686ae1..65a855c1355a21 100644 --- a/components/ws-proxy/pkg/proxy/workspacerouter.go +++ b/components/ws-proxy/pkg/proxy/workspacerouter.go @@ -50,6 +50,9 @@ func HostBasedRouter(header, wsHostSuffix string, wsHostSuffixRegex string) Work allClusterWsHostSuffixRegex = wsHostSuffix } + log.Info("setup acme router") + setupAcmeRouter(r) + var ( getHostHeader = func(req *http.Request) string { host := req.Header.Get(header) @@ -65,9 +68,6 @@ func HostBasedRouter(header, wsHostSuffix string, wsHostSuffixRegex string) Work ideRouter = r.MatcherFunc(matchWorkspaceHostHeader(allClusterWsHostSuffixRegex, getHostHeader, false)).Subrouter() ) - log.Info("setup acme router") - setupAcmeRouter(r) - r.NotFoundHandler = http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { hostname := getHostHeader(req) log.Infof("no match for path %s, host: %s", req.URL.Path, hostname)