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

@ -110,18 +110,3 @@ func GetDomainsForURL(u url.URL) []string {
func IsTCP(u *url.URL) bool {
return u.Scheme == "tcp+http" || u.Scheme == "tcp+https"
}
// ParseEnvoyQueryParams returns a new URL with queryparams parsed from envoy format.
func ParseEnvoyQueryParams(u *url.URL) *url.URL {
nu := &url.URL{
Scheme: u.Scheme,
Host: u.Host,
Path: u.Path,
}
path := u.Path
if idx := strings.Index(path, "?"); idx != -1 {
nu.Path, nu.RawQuery = path[:idx], path[idx+1:]
}
return nu
}