sunlightlabs / fcc_political_ads

Mapping TV stations to help citizens and journalists find stations to visit to gather documents on political ad buys.
0 stars 1 forks source link

Implement PathRestrictedProxy to allow caching for certain pages #108

Open dcloud opened 10 years ago

dcloud commented 10 years ago

Varnish won't cache pages with cookies, and we use csrftoken all over the place, so none of our pages get cached (I think). We should use something like PathRestrictedProxy middleware to give us the power to set SESSIONABLE_URL_PATTERNS.

Need to review what pages have login or form submission stuff that relies on cookies, then implement.

dcloud commented 10 years ago
HTTP/1.1 200 OK
Age: 0
Connection: keep-alive
Content-Encoding: gzip
Content-Length: 5798
Content-Type: text/html; charset=utf-8
Date: Thu, 27 Mar 2014 19:44:13 GMT
Server: nginx/1.1.19
Set-Cookie: csrftoken=8pzPg7W3nCCRKREPuHpRr1axGVSX50YZ; expires=Thu, 26-Mar-2015 19:43:01 GMT; Max-Age=31449600; Path=/
Vary: Cookie
Via: 1.1 varnish
X-Varnish: 1237333651