<html><body><div style="color:#000; background-color:#fff; font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:10pt"><div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">Hello all,</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">I have a big problem with auth cookie, esi include on my website. In my page i have a section made for auth users, it has 2 stages:</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">- if auth is made, show some user specific things, if not shows login button</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">auth works, logout works ... BUT somethimes after i logout i get details for some other user like i'm logged in with that user (but i'm not and there is no
auth cookie for it ... is just like plain html only from varnish, on refresh it goes away randomly)</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">I control esi trough http headers like u will see in my confs bellow.</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">If someone finds what is the problem, please let me know.</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">VARNISH</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">Package: varnish</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">Status: install ok installed</font></div><div><font face="Courier
New, courier, monaco, monospace, sans-serif" size="2">Priority: optional</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">Section: web</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">Installed-Size: 1295</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">Maintainer: Varnish Package Maintainers <pkg-varnish-devel@lists.alioth.debian.org></font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">Architecture: amd64</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">Version: 3.0.2-2</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif"
size="2">site.vcl</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">================================================================================================================</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">import std;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"># server 1</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">backend drr0001 {</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> .host = "drr0001";</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> .port = "80";</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> .connect_timeout = 1s;</font></div><div><font face="Courier New, courier, monaco,
monospace, sans-serif" size="2"> .first_byte_timeout = 30s;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> .between_bytes_timeout = 30s;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> .probe = {</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> .url = "/";</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> .interval = 2m;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> .timeout = 20s;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> .window =
5;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> .threshold = 3;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> }</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">}</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"># server 2</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">backend drr0002 {</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> .host = "drr0002";</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> .port = "80";</font></div><div><font face="Courier New, courier, monaco,
monospace, sans-serif" size="2"> .connect_timeout = 1s;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> .first_byte_timeout = 30s;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> .between_bytes_timeout = 30s;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> .probe = {</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> .url = "/";</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> .interval = 2m;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> .timeout = 20s;</font></div><div><font
face="Courier New, courier, monaco, monospace, sans-serif" size="2"> .window = 5;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> .threshold = 3;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> }</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">}</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"># server 3</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">backend drr0003 {</font></div><div><font face="Courier New, courier, monaco, monospace,
sans-serif" size="2"> .host = "drr0003";</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> .port = "80";</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> .connect_timeout = 1s;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> .first_byte_timeout = 30s;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> .between_bytes_timeout = 30s;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> .probe = {</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> .url = "/";</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">
.interval = 2m;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> .timeout = 20s;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> .window = 5;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> .threshold = 3;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> }</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">}</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div><font face="Courier New, courier,
monaco, monospace, sans-serif" size="2"># Round-Robin load balance site hosts</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">director site round-robin {</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> {</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> .backend = drr0001;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> }</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> {</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> .backend = drr0002;</font></div><div><font face="Courier New, courier, monaco, monospace,
sans-serif" size="2"> }</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> {</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> .backend = drr0003;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> }</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">}</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"># ACL to allow cache Purge</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">acl purge {</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span
class="Apple-tab-span" style="white-space:pre"> </span>"drr0001";</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>"drr0002";</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>"drr0003";</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>"drr0001-ifnet";</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>"drr0002-ifnet";</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>"drr0003-ifnet";</font></div><div><font face="Courier New, courier, monaco,
monospace, sans-serif" size="2">}</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"># Receive</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">sub vcl_recv {</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span># check acl purge at the top and purges</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> <span class="Apple-tab-span" style="white-space:pre"> </span>if (req.request == "PURGE") </font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>{</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif"
size="2"> <span class="Apple-tab-span" style="white-space:pre"> </span>if (!client.ip ~ purge) {</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> <span class="Apple-tab-span" style="white-space:pre"> </span>error 404 "Not Found!";</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> <span class="Apple-tab-span" style="white-space:pre"> </span>}</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> <span class="Apple-tab-span" style="white-space:pre"> </span>return (lookup);</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> <span class="Apple-tab-span" style="white-space:pre"> </span>}</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> </font></div><div><font face="Courier
New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>if (! req.http.Host)</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>{</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>error 404 "Your query need a host header !";</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>}</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>if (req.http.Host ~ "test.site.com")</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span"
style="white-space:pre"> </span>{</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>set req.backend = site;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>include "/etc/varnish/site-esi-recv.vcl";</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>}</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>else</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>{</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span
class="Apple-tab-span" style="white-space:pre"> </span>error 404 "No Varnish configuration for your host header.";</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>}</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">}</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">## FETCH</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">sub vcl_fetch {</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>if (req.restarts > 3) {</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span"
style="white-space:pre"> </span>set beresp.saintmode = 5m;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>}</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>if (req.http.Host ~ "test.site.com")</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>{</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>include "/etc/varnish/site-esi-fetch.vcl";</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>}</font></div><div><font face="Courier New, courier, monaco,
monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>else</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>{</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>return (deliver);</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>}</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">}</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"># HIT</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">sub vcl_hit
{</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>if (req.request == "PURGE") {</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>purge;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>error 200 "Purged.";</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>}</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">}</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">#
MISS</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">sub vcl_miss {</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>if (req.request == "PURGE") {</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>purge;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>error 200 "Purged.";</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>}</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">}</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif"
size="2"><br></font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">## DELIVER</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">sub vcl_deliver {</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>if (obj.hits > 0) {</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> <span class="Apple-tab-span" style="white-space:pre"> </span>set resp.http.X-Varnish-Cache = "From VARNISH (" +obj.hits+ ")";</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> <span class="Apple-tab-span" style="white-space:pre"> </span>} else {</font></div><div><font face="Courier New, courier,
monaco, monospace, sans-serif" size="2"> <span class="Apple-tab-span" style="white-space:pre"> </span>set resp.http.X-Varnish-Cache = "MISS";</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> <span class="Apple-tab-span" style="white-space:pre"> </span>}<span class="Apple-tab-span" style="white-space:pre"> </span></font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span># Secure the header</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>#remove resp.http.Via;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>#remove resp.http.X-Varnish;</font></div><div><font face="Courier New,
courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>#remove resp.http.Server;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>#remove resp.http.X-Powered-By;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">}</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">================================================================================================================</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">site-esi-fetch.vcl</font></div><div><font face="Courier New,
courier, monaco, monospace, sans-serif" size="2"><br></font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">================================================================================================================</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"># Enable ESI</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">set beresp.do_esi = true;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">set beresp.ttl = 0s;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">if (beresp.http.esi-enabled == "true") {</font></div><div><font face="Courier New, courier,
monaco, monospace, sans-serif" size="2"> set beresp.ttl = std.duration(beresp.http.esi-ttl,1m);</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"> unset beresp.http.esi-enabled;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>unset beresp.http.esi-ttl;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">}</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">return (deliver);</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif"
size="2">================================================================================================================</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">site-esi-recv.vcl</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">================================================================================================================</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"># Compatiblity with Apache log</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">remove
req.http.X-Forwarded-For;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">set req.http.X-Forwarded-For = client.ip;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"># Post requests will not be cached</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">if (req.request == "POST") </font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">{</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>return (pass);</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">}</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif"
size="2"><br></font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"># Pass Auth sessions</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">if (req.url ~ "auth/esirander" || req.url ~ "admin" || req.url ~ "support"){</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>return (pass);</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">}else{</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>unset req.http.cookie;</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">}</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div><font face="Courier New,
courier, monaco, monospace, sans-serif" size="2"># Normalize encoding/compression</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">if (req.http.Accept-Encoding) </font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">{</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>if (req.http.Accept-Encoding ~ "gzip") </font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>{ </font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>set req.http.Accept-Encoding = "gzip"; </font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span
class="Apple-tab-span" style="white-space:pre"> </span>}</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>elsif (req.http.Accept-Encoding ~ "deflate") </font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>{ </font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>set req.http.Accept-Encoding = "deflate"; </font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>}</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>else </font></div><div><font
face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>{ </font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>remove req.http.Accept-Encoding; </font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><span class="Apple-tab-span" style="white-space:pre"> </span>}</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">}</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"># Serve the page</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">unset req.http.vary;</font></div><div><font face="Courier New, courier, monaco, monospace,
sans-serif" size="2"><br></font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">return (lookup);</font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div><font face="Courier New, courier, monaco, monospace, sans-serif" size="2">================================================================================================================</font></div></div></div></body></html>