02. June 2023
CORS junk
At the last three jobs I’ve been at, I’ve hit some form of this issue:
- I am writing a web app.
- I am running locally on localhost while developing it.
- It needs to make an http request to a server on another origin (a “cross-origin” request, if you will).
- That server, at least at that moment, does not provide headers in its http responses that say “it is OK to make requests to me from localhost.”
- Requests from the browser to that server fail because of this CORS issue.