You've already forked oauth2-proxy
mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2025-06-15 00:15:00 +02:00
Enable UseEncodedPath() for frontend mux
This allows urls with encoded characters (e.g.: /%2F/) to pass to the upstream mux instead of triggering a HTTP 301 from the frontend. Otherwise a /%2F/test/ will result in a HTTP 301 -> /test/
This commit is contained in:
@ -915,6 +915,15 @@ func TestUserInfoEndpointUnauthorizedOnNoCookieSetError(t *testing.T) {
|
||||
assert.Equal(t, http.StatusUnauthorized, test.rw.Code)
|
||||
}
|
||||
|
||||
func TestEncodedUrlsStayEncoded(t *testing.T) {
|
||||
encodeTest, err := NewSignInPageTest(false)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
code, _ := encodeTest.GetEndpoint("/%2F/test1/%2F/test2")
|
||||
assert.Equal(t, 403, code)
|
||||
}
|
||||
|
||||
func NewAuthOnlyEndpointTest(querystring string, modifiers ...OptionsModifier) (*ProcessCookieTest, error) {
|
||||
pcTest, err := NewProcessCookieTestWithOptionsModifiers(modifiers...)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user