Recently I deploy an OAuth provider with apache/mod_wsgi. Everything works fine on django dev server locally, but is broken onto apache server. After analyzing the logs, it shows that the HTTP header ‘Authroization’ is dropped by default.
To pass thru OAuth parameters to mod_wsgi applications, you need to use the WSGIPassAuthorization directive. An example is like below, at the same level of ServerName directive:
Bear in mind that the ‘Authorization’ header will be passed thru and renamed to ‘HTTP_AUTHORIZATION’. You need to do such modification if you use python-oauth2 like me. I plan to submit a patch, in order to contribute and learn about git as well, LOL.