Closed kuwaitbinary closed 6 years ago
If you got CORS issues check your NGINX or Apache.
in my case it was Nginx.
`location / {
add_header 'Access-Control-Allow-Origin' '*';
... `
Also do not forgot too allow cross origin in your backend in django it is
ALLOWED_HOSTS = ["bla-bla.com", "localhost", "127.0.0.1"]
https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSMissingAllowOrigin?utm_source=devtools&utm_medium=firefox-cors-errors&utm_campaign=default
Thanks for your advice. This is an security mechanism of CORS you'll experience with every server whose domain is different than the client's domain.
If you got CORS issues check your NGINX or Apache.
in my case it was Nginx.
`location / {
add_header 'Access-Control-Allow-Origin' '*';
... `
Also do not forgot too allow cross origin in your backend in django it is
ALLOWED_HOSTS = ["bla-bla.com", "localhost", "127.0.0.1"]
https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSMissingAllowOrigin?utm_source=devtools&utm_medium=firefox-cors-errors&utm_campaign=default