diff --git a/pkg/web/session_handlers.go b/pkg/web/session_handlers.go index 2a87497..7f85aaa 100644 --- a/pkg/web/session_handlers.go +++ b/pkg/web/session_handlers.go @@ -58,7 +58,7 @@ func (s Server) Login() http.Handler { HttpOnly: true, Secure: true, }) - http.Redirect(w, r, "/", http.StatusTemporaryRedirect) + http.Redirect(w, r, "/", http.StatusFound) }) } diff --git a/test/session_test.go b/test/session_test.go index 9faea52..d60ba73 100644 --- a/test/session_test.go +++ b/test/session_test.go @@ -85,8 +85,8 @@ func TestLoginSuccess(t *testing.T) { res := httptest.NewRecorder() newServer(odooMock.URL).ServeHTTP(res, req) - is.Equal(res.Code, http.StatusTemporaryRedirect) // HTTP status - is.Equal(res.Header().Get("Location"), "/") // Location header + is.Equal(res.Code, http.StatusFound) // HTTP status + is.Equal(res.Header().Get("Location"), "/") // Location header is.Equal(1, len(res.Result().Cookies())) // number of cookies c := res.Result().Cookies()[0]