outposts/proxy: Fix invalid redirect on external hosts containing path components (#8915)

* outposts/proxy: Fix invalid redirect on external hosts containing path components

Signed-off-by: Max <github@germancoding.com>

* outposts/proxy: Fix test for changed redirect logic

Signed-off-by: Max <github@germancoding.com>

---------

Signed-off-by: Max <github@germancoding.com>
This commit is contained in:
Max
2024-03-19 20:31:08 +01:00
committed by GitHub
parent 880ca9a57d
commit 1b81973358
2 changed files with 4 additions and 15 deletions

View File

@ -56,7 +56,7 @@ func TestProxy_Redirect_Subdirectory(t *testing.T) {
loc, _ := rr.Result().Location()
assert.Equal(
t,
"https://ext.t.goauthentik.io/subdir/outpost.goauthentik.io/start?rd=https%3A%2F%2Fext.t.goauthentik.io%2Ffoo",
"https://ext.t.goauthentik.io/subdir/outpost.goauthentik.io/start?rd=https%3A%2F%2Fext.t.goauthentik.io%2Fsubdir%2Ffoo",
loc.String(),
)
}