Explorar el Código

Return status code 307 instead of 302 when redirecting from HTTP to HTTPS

Jakob Borg hace 10 años
padre
commit
fae68a5396
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      cmd/syncthing/gui.go

+ 1 - 1
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)
 		}