It would be great if cookie data was included in the environ parameter
given to the 'allow_access' function.
Looking through the mod_wsgi.c code, it looks like you construct a
Auth_environ PyObject that only passes through specific headers
(Content-Length, Content-Type, etc.). I guess that it would be possible to
add the "Cookie" header as "HTTP_COOKIE" in a similar way.
The use case I have for this is to restrict access to static media based
upon the user having a particular cookie set (i.e. auth token).
It's only cookies that I personally would need to access. However, I
imagine it could be handy to have other headers available such as
User-Agent and Referer, which could be used as a basis for
granting/blocking access. Would it be feasible to have all the headers
available as per the environ parameter to the 'application' WSGI function?
Original issue reported on code.google.com by fras...@gmail.com on 15 Oct 2009 at 2:22
Original issue reported on code.google.com by
fras...@gmail.com
on 15 Oct 2009 at 2:22