adamchainz / django-cors-headers

Django app for handling the server headers required for Cross-Origin Resource Sharing (CORS)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CORS_ORIGIN_ALLOW_ALL does not work with chrome

mcsantiago opened this issue · comments

Django version 2.2
django-cors-headers version 2.5.2

I cannot seem to get the GET request from an angular client to come through to the django backend, even with CORS_ORIGIN_ALLOW_ALL set to True.

corsheaders is declared at the top of INSTALLED_APPS.
corsheaders.middleware.CorsMiddleware is declared at the top of MIDDLEWARE.
The only other django package installed is djangorestframework.

The request works from Firefox browser, but not with Chrome. I'm not sure what else to try at this point.

Hi Matthew,

You should be able to see all the requests in the network tab on chrome's devtools, and any error message about the request in the console tab.

I'm afraid I don't have time to help debug every CORS error, there are many ways it can fail. The MDN docs are really worth reading.

Thanks,

Adam