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

Set the Via header in proxy requests to origin and in client responses #629

Merged
merged 3 commits into from
Sep 22, 2024

Conversation

dedalusj
Copy link
Contributor

@dedalusj dedalusj commented Jul 24, 2024

Set the Via HTTP header in requests to origin app and in the client responses.

Applications that uses the oauth workflow require the server to redirect the user back to the callback address. However when running the application behind the air proxy there is no information about which host is the proxy running out. This causes the application to redirect the user to a callback path on the host the application is running at causing a breakdown of the oath flow.

Adding the Via header to the proxy requests allows the applications to detect the proxy host and craft an appropriate callback URL for the oauth flow.

@cosmtrek
Copy link
Collaborator

@dedalusj Hi, could you fix the conflicts?

@dedalusj
Copy link
Contributor Author

@cosmtrek Done

Copy link

codecov bot commented Sep 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
runner/proxy.go 66.66% <100.00%> (+0.98%) ⬆️

@cosmtrek cosmtrek merged commit 7187d7f into air-verse:master Sep 22, 2024
8 checks passed
jesses-code-adventures pushed a commit to jesses-code-adventures/air that referenced this pull request Sep 25, 2024
air-verse#629)

* Set the Via header in proxy requests to origin and in client responses

* Remove pseudonym and use host only
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