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

fix host name at the reverse proxy by explicilty setting hostname bot… #2

Merged
merged 2 commits into from
Jan 27, 2021

Conversation

spaparaju
Copy link
Contributor

At ReverseProxy, HTTP Header value for Host is not set properly (instead contains the hostname of the token-refresher).
With this problem, The local tests would pass as both the source and host to proxy are both 'localhost'.
This problem can be reproduced when the host to proxy to is different from the the host the token-refresher runs.
This fix require explicitly setting the hostname as part of HttpRequest at the ReverseProxy.

Checkout reference to this problem here

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
…h at httpRequest and httpRequest.URL
main.go Outdated
}
return a + b
}
func joinURLPath(a, b *url.URL) (path, rawpath string) {
Copy link
Member

Choose a reason for hiding this comment

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

this function seems to be unused. Can we remove it from the file?

main.go Outdated
@@ -231,3 +238,33 @@ func main() {
stdlog.Fatal(err)
}
}

func singleJoiningSlash(a, b string) string {
Copy link
Member

Choose a reason for hiding this comment

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

this one too

@spaparaju
Copy link
Contributor Author

Ooops! removed not used functions..

@squat
Copy link
Member

squat commented Jan 27, 2021

🚀

@squat squat merged commit 6e875c2 into observatorium:master Jan 27, 2021
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.

None yet

2 participants