Forums

web2py request header vars

We try to access a variable (auth_token) , which is passed in the request header. The local web2py server deliveres this variable via: request.env.http_auth_token

But in the pythonanywhere environment request.env.http_auth_token is empty? How can I get variables from the request header ?

Kind regards, Sven

The problem could be, that custom request headers are not passed through wsgi - any ideas ?

Ah. That seems to be a bit of an oversight on our part. I'll raise a ticket so we can fix it.

now even standard headers are not passed - I set the request Header "via" , yesterday all worked - today I does not work ?

remark: this was my fault - standard headers are passed, I can access "via" as request.env.http_via

Thanks for updating, I'm glad at least the standard headers are working!