From dff176ae0469bc60604ddae2e9f651881c7026de Mon Sep 17 00:00:00 2001 From: Kristian Lyngstol Date: Fri, 25 Mar 2016 15:49:37 +0100 Subject: NMS: Tweak colors for DHCP map --- web/etc/varnish/nms.vcl | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'web/etc/varnish/nms.vcl') diff --git a/web/etc/varnish/nms.vcl b/web/etc/varnish/nms.vcl index 0cddebd..53a9444 100644 --- a/web/etc/varnish/nms.vcl +++ b/web/etc/varnish/nms.vcl @@ -37,6 +37,7 @@ sub vcl_recv { return (hash); } + # Rosa magi sub vcl_hash { # Wheee. Legg til authorization-headeren i hashen. @@ -50,4 +51,8 @@ sub vcl_backend_response { if (beresp.http.x-ban) { ban("obj.http.x-url ~ " + beresp.http.x-ban); } + if (beresp.status != 200) { + set beresp.uncacheable = false; + set beresp.ttl = 5s; + } } -- cgit v1.2.3