django-cors-middleware
django-cors-middleware copied to clipboard
CORS: using defaults in the settings file causes circular dependency.
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.
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.