From 16834ccbf4301a4f671083c5f040f698764ae4cf Mon Sep 17 00:00:00 2001 From: "Alex Ellis (OpenFaaS Ltd)" Date: Wed, 26 Feb 2025 12:43:22 +0000 Subject: [PATCH] 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) --- gateway/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gateway/main.go b/gateway/main.go index 712cd749..f29f2d8f 100644 --- a/gateway/main.go +++ b/gateway/main.go @@ -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