Created
January 29, 2021 21:34
-
-
Save khorramk/2c0828ca296832b0319d0155a36af7af to your computer and use it in GitHub Desktop.
Client side Cors error fix
This file contains 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
fetch(url, { | |
method: "get", //put your method | |
headers: { | |
"Content-Type": "application/json", | |
"X-Requested-With": "XMLHttpRequest", | |
"Access-Control-Allow-Origin": "*" | |
}, | |
mode: 'no-cors' | |
}); | |
//Note: works fine in chrome browsers |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment