django-cors-middleware icon indicating copy to clipboard operation
django-cors-middleware copied to clipboard

CORS: using defaults in the settings file causes circular dependency.

Open peymanmortazavi opened this issue 7 years ago • 1 comments

If you import corsheaders.defaults.default_headers in your setting file to add a custom header to the list of default allowed headers, it'll fail due to circular dependency.

We can probably have a file just for constants and basic types like this and then reference them when needed. That way, we wouldn't have circular dependency.

peymanmortazavi avatar Jul 17 '17 22:07 peymanmortazavi

In the latest version of django-cors-headers (of which this project is a fork), it appears this is not an issue... defaults.py does not import settings as it does in this.

december1981 avatar Oct 02 '19 14:10 december1981