Skip to content

Commit

Permalink
Change oauth redirect to 307
Browse files Browse the repository at this point in the history
  • Loading branch information
Ph0tonic committed Jan 9, 2025
1 parent 69fd353 commit efd71e7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion rootfs/etc/nginx/template/nginx.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,7 @@ stream {
modsecurity off;
{{ end }}

return 302 {{ buildAuthSignURL $externalAuth.SigninURL $externalAuth.SigninURLRedirectParam }};
return 307 {{ buildAuthSignURL $externalAuth.SigninURL $externalAuth.SigninURLRedirectParam }};
}
{{ end }}
{{ end }}
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/annotations/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ http {
WithQuery("a", "b").
WithQuery("c", "d").
Expect().
Status(http.StatusFound).
Status(http.StatusTemporaryRedirect).
Header("Location").Equal(fmt.Sprintf("http://%s/auth/start?rd=http://%s%s", host, host, url.QueryEscape("/?a=b&c=d")))
})

Expand Down Expand Up @@ -714,7 +714,7 @@ http {
WithQuery("a", "b").
WithQuery("c", "d").
Expect().
Status(http.StatusFound).
Status(http.StatusTemporaryRedirect).
Header("Location").Equal(fmt.Sprintf("http://%s/auth/start?orig=http://%s%s", host, host, url.QueryEscape("/?a=b&c=d")))
})

Expand Down Expand Up @@ -861,7 +861,7 @@ http {
WithQuery("a", "b").
WithQuery("c", "d").
Expect().
Status(http.StatusFound).
Status(http.StatusTemporaryRedirect).
Header("Location").Equal(fmt.Sprintf("http://%s/auth/start?rd=http://%s%s", thisHost, thisHost, url.QueryEscape("/?a=b&c=d")))
})
})
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/annotations/satisfy.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ var _ = framework.DescribeAnnotation("satisfy", func() {
WithQuery("a", "b").
WithQuery("c", "d").
Expect().
Status(http.StatusFound).
Status(http.StatusTemporaryRedirect).
Header("Location").Equal(fmt.Sprintf("http://%s/auth/start?rd=http://%s%s", host, host, url.QueryEscape("/?a=b&c=d")))
})
})

0 comments on commit efd71e7

Please sign in to comment.