Python Flask mod-wsgi Custom Headers not in Request Python Flask mod-wsgi Custom Headers not in Request flask flask

Python Flask mod-wsgi Custom Headers not in Request


Well this one took me many hours...

Turns out that only alphanumeric characters or '-' are allowed.

Any headers not conforming these will be ignored.

http://modwsgi.readthedocs.org/en/latest/release-notes/version-4.3.0.html <- Bug fixes, point 2.


The solution is to set the claim prefix to something without _ like

OIDCClaimPrefix OIDC-CLAIM-


Ensure your Apache configuration has the WSGIPassAuthorization directive set to 'On' so your headers get past Apache + WSGI and to your Flask app.