question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Importing default_headers configures corsheaders

See original GitHub issue

Doing 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:closed
  • Created 7 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
sagrawal-idrccommented, Nov 10, 2016

@Tritlo I faced a slighly different, but related issue. Saw that I was using django-cors-headers-1.1.0. Upgrading to 1.3.1 helped.

0reactions
adamchainzcommented, Nov 10, 2016

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:

I was definitely using the 1.2.2 version, at least that was what was in my requirements file. The PyPi 1.2.2 matches the tag here, right?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/ottoyiu/django-cors-headers/issues/160#issuecomment-259727531, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0WCfI4wl7OHpQ4lMyY6J7swNueh4dLks5q8z7GgaJpZM4KlM_8 .

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found