Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proposal: net/http/httputil: deprecate ReverseProxy.Director #73161

Open
mpx opened this issue Apr 4, 2025 · 1 comment
Open

proposal: net/http/httputil: deprecate ReverseProxy.Director #73161

mpx opened this issue Apr 4, 2025 · 1 comment
Labels
Documentation Issues describing a change to documentation. LibraryProposal Issues describing a requested change to the Go standard library or x/ libraries, but not to a tool Proposal
Milestone

Comments

@mpx
Copy link
Contributor

mpx commented Apr 4, 2025

The ReverseProxy.Rewrite API was added (#53002) to address security/other issues (#28168, #50580) with ReverseProxy.Director.

The current httputil.ReverseProxy documentation doesn't make it particularly clear why Rewrite is generally preferred over Director (eg, gotchas).

#50580 proposed:

Since in this case the existing API is inherently insecure, I propose that we [..] mark Director as deprecated

I think deprecation of the problematic API is a good idea, but maybe there was a reason this wasn't done when Rewrite was added?
Alternatively, the documentation for Rewrite and/or Director could be improved to make it clear why/when to use one over the other.

Cc @neild

@gopherbot gopherbot added the Documentation Issues describing a change to documentation. label Apr 4, 2025
@gabyhelp gabyhelp added the LibraryProposal Issues describing a requested change to the Go standard library or x/ libraries, but not to a tool label Apr 4, 2025
@seankhliao seankhliao changed the title net/http/httputil: Document ReverseProxy.Director as Deprecated proposal: net/http/httputil: deprecate ReverseProxy.Director Apr 4, 2025
@gopherbot gopherbot added this to the Proposal milestone Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Issues describing a change to documentation. LibraryProposal Issues describing a requested change to the Go standard library or x/ libraries, but not to a tool Proposal
Projects
None yet
Development

No branches or pull requests

3 participants