mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
12 lines
569 B
Markdown
12 lines
569 B
Markdown
|
|
The [ReverseProxy.Director] configuration field is deprecated
|
||
|
|
in favor of [ReverseProxy.Rewrite].
|
||
|
|
|
||
|
|
A malicious client can remove headers added by a `Director` function
|
||
|
|
by designating those headers as hop-by-hop. Since there is no way to address
|
||
|
|
this problem within the scope of the `Director` API, we added a new
|
||
|
|
`Rewrite` hook in Go 1.20. `Rewrite` hooks are provided with both the
|
||
|
|
unmodified inbound request received by the proxy and the outbound request
|
||
|
|
which will be sent by the proxy.
|
||
|
|
|
||
|
|
Since the `Director` hook is fundamentally unsafe, we are now deprecating it.
|