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!
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!
If you are using mod_wsgi
, just install apache and use it inside your VirtualHost.
And then: WSGIPassAuthorization On
You have to go to /etc/apache2/sites-enabled where your configuration file sits either the one with SSL certificates or the one without and add WSGIPassAuthorization On
where the file ends.
© 2022 - 2024 — McMap. All rights reserved.
Server.app
version of mod_wsgi? Or are you usingmod_wsgi-express
? They are the only ways of using mod_wsgi on macOS where you wouldn't have had to configure Apache yourself. If you are usingmod_wsgi-express
, directly or via Djangorunmodwsgi
, then that directive is set by default. – Thundersquall