jeremydaly / jeremydaly/lambda-api
CORS Error due to lowercase
Open
Nobody has claimed this yet.
enhancement
question
- Dominant language
- JavaScript
- Stars
- 1.5k
- Forks
- 127
- Avg merge
- 31m
- Merged PRs (30d)
- 2
Description
Firefox will not recognize cors headers due to them being lowercased:
Removing the "toLowerCase" fixes the issue.
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://url.com/bla. (Reason: header ‘sentry-trace’ is not allowed according to header ‘Access-Control-Allow-Headers’ from CORS preflight response).
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://url.com/bla. (Reason: CORS request did not succeed).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The referenced change is in lib/response.js at line 68; inspect the CORS header construction there and reproduce the Firefox preflight failure described in the issue. Done means the response preserves the header form expected by Firefox without the reported CORS error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, javascript, nodejs
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100