Change to temporary redirect

When exposed via a tunnel, if the underlying service is
switched, the browser remembers the / => /ui redirection
so this can be changed to a temporary redirect.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
This commit is contained in:
Alex Ellis (OpenFaaS Ltd) 2025-02-26 12:43:22 +00:00
parent 4e20249bc0
commit 16834ccbf4

View File

@ -256,7 +256,7 @@ func main() {
r.HandleFunc("/healthz",
handlers.MakeForwardingProxyHandler(reverseProxy, forwardingNotifiers, urlResolver, nilURLTransformer, serviceAuthInjector)).Methods(http.MethodGet)
r.Handle("/", http.RedirectHandler("/ui/", http.StatusMovedPermanently)).Methods(http.MethodGet)
r.Handle("/", http.RedirectHandler("/ui/", http.StatusTemporaryRedirect)).Methods(http.MethodGet)
tcpPort := 8080