diff --git a/pkg/handler/handler_test.go b/pkg/handler/handler_test.go index af398cb..fd3df19 100644 --- a/pkg/handler/handler_test.go +++ b/pkg/handler/handler_test.go @@ -371,7 +371,7 @@ func TestHandler_Default(t *testing.T) { target := idp.RelyingPartyServer.URL + "/" resp := get(t, rpClient, target) - assert.Equal(t, http.StatusTemporaryRedirect, resp.StatusCode) + assert.Equal(t, http.StatusSeeOther, resp.StatusCode) // redirect should point to local login endpoint loginLocation := resp.Location @@ -480,7 +480,7 @@ func TestHandler_Default(t *testing.T) { target := idp.RelyingPartyServer.URL + path resp := get(t, rpClient, target) - assert.Equal(t, http.StatusTemporaryRedirect, resp.StatusCode) + assert.Equal(t, http.StatusSeeOther, resp.StatusCode) }) } }) diff --git a/pkg/handler/reverseproxy/reverseproxy.go b/pkg/handler/reverseproxy/reverseproxy.go index d348da0..c35bb85 100644 --- a/pkg/handler/reverseproxy/reverseproxy.go +++ b/pkg/handler/reverseproxy/reverseproxy.go @@ -86,7 +86,7 @@ func (rp *ReverseProxy) Handler(src Source, w http.ResponseWriter, r *http.Reque path := src.GetPath(r) loginUrl := url.LoginURL(path, redirectTarget) - http.Redirect(w, r, loginUrl, http.StatusTemporaryRedirect) + http.Redirect(w, r, loginUrl, http.StatusSeeOther) return }