Skip to content

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

@mpx

Description

@mpx

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationIssues describing a change to documentation.LibraryProposalIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolProposal

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions