Apache strips down “Authorization” header

后端 未结 2 1054
栀梦
栀梦 2020-12-03 01:44

I\'m having a little issue with my Apache 2.2.15 Server. I\'m running a Django app on top of it with mod_wsgi. I activated WSGIPassAuthorization On, which made

2条回答
  •  失恋的感觉
    2020-12-03 02:28

    I solved my problem, which finally was totally unrelated to my Apache configuration. So if you found this topic looking for an answer to the same problem, one of the solutions below should fix it :

    Config WSGI :

    WSGIPAssAuthorization On
    

    Config .htaccess :

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

    You can put both of those into your httpd/conf.d/project.conf file !

提交回复
热议问题