Importing default_headers configures corsheaders
See original GitHub issueDoing from corsheaders.defaults import default_headers
seems to initialize corsheaders
, and does not allow me to add custom headers, however, if I do not import and just copy the values over, it works. This is most likely due to __init__.py
import .checks
, which is triggererd when the defaults
submodule is being imported.
Issue Analytics
- State:
- Created 7 years ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Importing default_headers configures corsheaders · Issue #160
Doing from corsheaders.defaults import default_headers seems to initialize corsheaders, and does not allow me to add custom headers, ...
Read more >django-cors-headers - PyPI
Configuration. Configure the middleware's behaviour in your Django settings. You must set at least one of three following settings: CORS_ALLOWED_ORIGINS.
Read more >django-cors-headers and nginx config - Stack Overflow
Django-cors-header. Here it sufficed to add non-default headers. from corsheaders.defaults import default_headers CORS_ALLOW_HEADERS = list( ...
Read more >How to Enable Cross Origin Resource Sharing (CORS ... - getKT
Default headers that are allowed can be import as follows 'corsheaders.defaults.default_headers' . CORS_EXPOSE_HEADERS. List of extra standard ...
Read more >CORS Middleware
from oslo_middleware import cors from oslo_config import cfg app = cors. ... allows a WSGI app to serve CORS headers for multiple configured...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Tritlo I faced a slighly different, but related issue. Saw that I was using
django-cors-headers-1.1.0
. Upgrading to1.3.1
helped.Yes it does. Ah well, it’s fixed.
On Thu, 10 Nov 2016 at 15:56, Matthías Páll Gissurarson < notifications@github.com> wrote: