From fae68a53964a51ca5694810c579f5125c906206b Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Fri, 29 Jan 2016 11:07:51 +0100 Subject: [PATCH] Return status code 307 instead of 302 when redirecting from HTTP to HTTPS --- cmd/syncthing/gui.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/syncthing/gui.go b/cmd/syncthing/gui.go index f3a739a6..7e7cc4f5 100644 --- a/cmd/syncthing/gui.go +++ b/cmd/syncthing/gui.go @@ -424,7 +424,7 @@ func redirectToHTTPSMiddleware(h http.Handler) http.Handler { // Redirect HTTP requests to HTTPS r.URL.Host = r.Host r.URL.Scheme = "https" - http.Redirect(w, r, r.URL.String(), http.StatusFound) + http.Redirect(w, r, r.URL.String(), http.StatusTemporaryRedirect) } else { h.ServeHTTP(w, r) }