fix: make reverse proxy strip origin/referer hdr#102
Open
cekrem wants to merge 2 commits into
Open
Conversation
Member
|
The header change seems sensible, but please don't touch the version number. We'll do that as part of the release process |
Author
Very sorry, didn't mean to overstep. I'll revert that one. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Quick Summary: Strip
OriginandRefererheaders in the reverse proxy so that requests fromlamdera live's in-browser fake backend don't appear to originate from a browser, avoiding CORS rejections and other server-side browser-detection issues.SSCCE
-- N/A — this is a tooling fix in the reverse proxy, not an Elm code issue.Additional Details
The
lamdera livedev workflow runs a fake backend in the browser. Requests routed through the reverse proxy (port 8001) carried browser headers likeOriginandReferer, causing some servers to reject them or respond differently than they would to a real backend request. (Concrete example: Azure Entra with Authorization Code flow)Fix: added a
filterstep inmodReq(before the existing header transforms) to dropOriginandReferer. TheUser-Agentwas already being replaced with"node", so this completes the picture of making proxied requests look like they come from a non-browser client.Bumped patch version to
1.4.2.