Skip to content

Correct way to pass headers to a Flask/WSGI app? #705

Answered by chrisinmtown
chrisinmtown asked this question in Q&A
Discussion options

You must be logged in to vote

Here's a posting written so I can accept it as the answer.

A flask/WSGI app (proxied or hosted) by Apache HTTPD version 2.4 receives no OIDC request headers because they contain underscore. To receive headers set by mod-auth-openidc, I changed the default OIDC header prefix to have no underscores via the following configuration line in a httpd.conf (or httpd-ssl.conf, etc.):

OIDCClaimPrefix Oidc-Claim-

With this in place, the headers set by mod-auth-openidc arrive at my python/flask/wsgi app.

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@chrisinmtown
Comment options

@zandbelt
Comment options

Comment options

You must be logged in to vote
3 replies
@zandbelt
Comment options

@jsferrazza
Comment options

@zandbelt
Comment options

Answer selected by chrisinmtown
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants