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

[ws-proxy] Remove the port number from "X-Forwarded-Host" header as it's already defined in "X-Forwarded-Port" #11253

Merged
merged 1 commit into from
Jul 9, 2022

Conversation

felladrin
Copy link
Contributor

@felladrin felladrin commented Jul 9, 2022

Description

Remove the port number from "X-Forwarded-Host" header as it's already defined in "X-Forwarded-Port".

This is a suggestion from @ChakshuGautam, and it seems correct to don't have a port there.

Related Issue(s)

How to test

  • Open a workspace on the Preview Environment of this PR.
  • Run curl lama.sh | sh
  • Run gp preview $(gp url 8080) --external to open a browser.
  • Confirm you see, in the terminal logs of the request, the "X-Forwarded-Host" and "X-Forwarded-Port" headers. The first should have only the host and the second, only the port.

Release Notes

Requests on ws-proxy won't contain the port anymore on the "X-Forwarded-Host" header. It will contain only the host. If you need the port, you can get it from the "X-Forwarded-Port" header.

Documentation

None.

Werft options:

  • /werft with-preview

@felladrin felladrin requested a review from a team July 9, 2022 12:32
@github-actions github-actions bot added the team: workspace Issue belongs to the Workspace team label Jul 9, 2022
@gitpod-io gitpod-io deleted a comment from werft-gitpod-dev-com bot Jul 9, 2022
@roboquat roboquat merged commit fe690d2 into main Jul 9, 2022
@roboquat roboquat deleted the felladrin/ws-proxy-headers branch July 9, 2022 12:46
@roboquat roboquat added deployed: workspace Workspace team change is running in production deployed Change is completely running in production labels Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: workspace Workspace team change is running in production deployed Change is completely running in production release-note size/XS team: workspace Issue belongs to the Workspace team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants