How to enable WSGIPassAuthorization for Django?

2019-07-25 10:36发布

问题:

I am testing my Django API endpoints but I need to enable WSGIPassAuthorization to let Authorization header be received. Where should I enable it?

PS: I am on macOS, but any answer might be useful!

回答1:

If you are using mod_wsgi, just install apache and use it inside your VirtualHost.

And then: WSGIPassAuthorization On