Answer the question
In order to leave comments, you need to log in
React CORS issue?
Hi everyone, I'm making a get request to api - gallery.dev.webant.ru/api/photos?new=true, but it throws out CORS, I googled it but didn't understand what I need to DO EXACTLY to remove CORS, well, it throws an error (no access to back end)
Answer the question
In order to leave comments, you need to log in
Is your backend? It is impossible to return origins separated by commas. Either a static address, or give what is in the Origin request header.
If not yours, then make some kind of proxy, either chrome + disable web security or firefox + cors everywhere.
Or, if you're on a LAN, then open Chrome (for example) in unsafe mode.
For windows:
chrome.exe --disable-web-security --user-data-dir="c:/www"
--user-data-dir — folder where Chrome's temporary files will be stored.
If not windows, then everything is here:
https://stackoverflow.com/questions/35432749/disab...
And if not Chrome, then I did not take it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question