auth: do not strip query parameters in forward auth (#2216)

This commit is contained in:
wasaga 2021-05-28 17:19:18 -04:00 committed by GitHub
parent d538f1d104
commit db00821001
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 38 deletions

View file

@ -157,22 +157,3 @@ func TestGetDomainsForURL(t *testing.T) {
})
}
}
func TestParseEnvoyQueryParams(t *testing.T) {
tests := []struct {
name string
u *url.URL
want *url.URL
}{
{"empty", &url.URL{}, &url.URL{}},
{"basic example", &url.URL{Host: "pomerium.io", Path: "/?uri=https://pomerium.com/"}, &url.URL{Host: "pomerium.io", Path: "/", RawQuery: "uri=https://pomerium.com/"}},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got := ParseEnvoyQueryParams(tt.u)
if diff := cmp.Diff(got, tt.want); diff != "" {
t.Errorf("ParseEnvoyQueryParams() = %v", diff)
}
})
}
}