301 MovedPermanently is cached by the browser which can be annoying when it is is on base path like / while one may reuse the domain (e.g. localhost) for other apps/tests.
Fixes #695
Signed-off-by: Jeremy Clerc <jeremy@clerc.io>
943 | 943 | ||
944 | 944 | func (s *httpdServer) redirectToWebPath(w http.ResponseWriter, r *http.Request, webPath string) { |
|
945 | 945 | if dataprovider.HasAdmin() { |
|
946 | - | http.Redirect(w, r, webPath, http.StatusMovedPermanently) |
|
946 | + | http.Redirect(w, r, webPath, http.StatusFound) |
|
947 | 947 | return |
|
948 | 948 | } |
|
949 | 949 | if s.enableWebAdmin { |
1200 | 1200 | if s.enableWebClient { |
|
1201 | 1201 | s.router.Get(webBaseClientPath, func(w http.ResponseWriter, r *http.Request) { |
|
1202 | 1202 | r.Body = http.MaxBytesReader(w, r.Body, maxRequestSize) |
|
1203 | - | http.Redirect(w, r, webClientLoginPath, http.StatusMovedPermanently) |
|
1203 | + | http.Redirect(w, r, webClientLoginPath, http.StatusFound) |
|
1204 | 1204 | }) |
|
1205 | 1205 | s.router.Get(webClientLoginPath, s.handleClientWebLogin) |
|
1206 | 1206 | s.router.Post(webClientLoginPath, s.handleWebClientLoginPost) |