[Django]-WSGIPassAuthorization On is not working

2👍

Connect to your Apache, go to etc/httpd/conf.d folder and open wsgi.conf file. Insert the code within VirtualHost DOM:

WSGIPassAuthorization On

RewriteEngine on
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]

Restart the server.

0👍

If anyone is tearing their hair out on this like I was, make sure if you have ssl configured on your site and a separate apache config file for *:443, you have it there as well.

Leave a comment