mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-01 03:16:31 +02:00
authorize: decode CheckRequest path for redirect (#2357)
This commit is contained in:
parent
ca8205f0b4
commit
b4b86dccb4
1 changed files with 3 additions and 2 deletions
|
@ -191,10 +191,11 @@ func getCheckRequestURL(req *envoy_service_auth_v3.CheckRequest) url.URL {
|
||||||
// envoy sends the query string as part of the path
|
// envoy sends the query string as part of the path
|
||||||
path := h.GetPath()
|
path := h.GetPath()
|
||||||
if idx := strings.Index(path, "?"); idx != -1 {
|
if idx := strings.Index(path, "?"); idx != -1 {
|
||||||
u.Path, u.RawQuery = path[:idx], path[idx+1:]
|
u.RawPath, u.RawQuery = path[:idx], path[idx+1:]
|
||||||
} else {
|
} else {
|
||||||
u.Path = path
|
u.RawPath = path
|
||||||
}
|
}
|
||||||
|
u.Path, _ = url.PathUnescape(u.RawPath)
|
||||||
return u
|
return u
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue