Middleware doesn't add any headers
See original GitHub issueI’ve added CORS_ORIGIN_WHITELIST = ['<some_domain>']
, added app to INSTALLED_APPS
and added correct middleware to MIDDLEWARE
in settings.py and I get NO additional headers that should be generated to fulfill CORS mechanism
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Express middleware not picking up header despite it being ...
Currently, the middleware is not picking up the auth_token header in the request despite it being sent. Any help is appreciated, code below....
Read more >JS middleware doesn't seem to set headers? - Support
I have a few js middlewares that I'm using in both pre- and post-processing scenarios. I know they're being called, because log messages ......
Read more >Set header in request (middleware) - Laracasts
Hi, I want to make an api, and by default I want to add the header "Accept: application/json" in a middleware group, this...
Read more >How to set headers, especially in middleware #11 - GitHub
Regarding adding headers in, the first way to solve it is to just use maps. The ring-http-response library may help if you take...
Read more >How do you add headers to a response with a middleware
I can't figure out how to how to add headers to a response from a middleware. I've used both ->header(...) and ->headers->set(.
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
@joerick I’d accept a docs PR
This convo was helpful - after installing corsheaders I wanted to test it was working by doing a
curl -v url
- it doesn’t show the header in this case.To test, you can do
curl -v -H 'Origin: somedomain.com' http://localhost:8000/api/endpoint
. Might be worth a note in the readme? ¯\_(ツ)_/¯