Skip to content

Commit

Permalink
Change to temporary redirect
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
alexellis committed Feb 26, 2025
1 parent 4e20249 commit 16834cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gateway/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 16834cc

Please sign in to comment.