mirror of
https://github.com/infinite-iroha/touka.git
synced 2026-06-13 15:47:38 +08:00
docs: explain reverse proxy query normalization
Some checks failed
Go Test / test (push) Has been cancelled
Some checks failed
Go Test / test (push) Has been cancelled
Clarify that outgoing proxy queries are normalized before forwarding, which may re-encode or drop non-standard fragments to keep parsing behavior consistent across proxy chains.
This commit is contained in:
parent
6d89b8674f
commit
8031e799d9
2 changed files with 7 additions and 0 deletions
|
|
@ -910,6 +910,11 @@ func cleanReverseProxyQueryParams(rawQuery string) string {
|
|||
if rawQuery == "" {
|
||||
return ""
|
||||
}
|
||||
// Normalize the outgoing query string so the proxy and upstream do not see
|
||||
// different semantics for non-standard separators or malformed pairs.
|
||||
// This can change the exact textual form of the original query and may drop
|
||||
// parts that net/url rejects, but it keeps proxy-chain parsing behavior more
|
||||
// consistent and reduces parameter-smuggling ambiguity.
|
||||
values, _ := url.ParseQuery(rawQuery)
|
||||
return values.Encode()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue