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

oauthproxy: forward Host header explicitly #2

Merged
merged 1 commit into from
Oct 29, 2018

Conversation

stephen
Copy link

@stephen stephen commented Oct 29, 2018

The proxy should send the requested Host header up so that CheckOrigin passes correctly on the upstream target's side.

Also see: koding/websocketproxy#9. My belief from reading the issue is that the proxy should handle this but does not.

The proxy should send the requested Host header up so that
CheckOrigin passes correctly on the upstream target's side.

Also see: //github.com/koding/websocketproxy/issues/9
@@ -132,6 +132,9 @@ func setProxyUpstreamHostHeader(proxy *ReverseProxy, target *url.URL) {
req.URL.Opaque = req.RequestURI
req.URL.RawQuery = ""
}
proxy.wsProxy.Director = func(req *http.Request, out http.Header) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any x-forwarded-for that should happen as well? Or is that already handled?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's handled by the proxy itself. I think this should also be handled by the proxy by default, mentioned here: koding/websocketproxy#9 (comment)

@stephen stephen merged commit 11825df into master Oct 29, 2018
@berfarah berfarah deleted the stephen/fix-host-header-forwarding branch October 30, 2018 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants