I am using fake api and getting this well known "No 'Access-Control-Allow-Origin' header is present on the requested resource."
I watched videos and read articles related to this problem but they are showing the solution while they are using their own server (express) and api but I am using a third party API then how I would set headers for it?
The errors:
If you are using google chrome, you can simply disable web security during your development:
Open cmd
Go to chrome.exe installation dir ( C:\Program Files\Google\Chrome\Application
is Default dir):
cd C:\Program Files\Google\Chrome\Application
Open chrome.exe with --disable-web-security argument:
chrome.exe --disable-web-security
You can find more info for other OS here
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.