From 9bf9cd8bf0d52f07e7bcb8a1f4d8b792c3274729 Mon Sep 17 00:00:00 2001 From: Kristian Lyngstol Date: Mon, 21 Mar 2016 19:10:45 +0100 Subject: FIX FAX APACHE NMS PUBLIC --- web/etc/varnish/nms.vcl | 3 --- 1 file changed, 3 deletions(-) (limited to 'web/etc/varnish') diff --git a/web/etc/varnish/nms.vcl b/web/etc/varnish/nms.vcl index 6349238..93da9de 100644 --- a/web/etc/varnish/nms.vcl +++ b/web/etc/varnish/nms.vcl @@ -22,9 +22,6 @@ sub vcl_recv { return (synth(418,"LOLOLOL")); } - # Hardcoded for testing - set req.http.host = "nms.tg16.gathering.org"; - if (req.method != "GET" && req.method != "HEAD") { /* We only deal with GET and HEAD by default */ return (pass); -- cgit v1.2.3 From e4f3bbbaffcc7315f73ecf55a52ad61814d96100 Mon Sep 17 00:00:00 2001 From: Kristian Lyngstol Date: Wed, 23 Mar 2016 02:52:26 +0100 Subject: NMS: Fix cache invalidation etc --- web/etc/varnish/nms.vcl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'web/etc/varnish') diff --git a/web/etc/varnish/nms.vcl b/web/etc/varnish/nms.vcl index 93da9de..0cddebd 100644 --- a/web/etc/varnish/nms.vcl +++ b/web/etc/varnish/nms.vcl @@ -11,6 +11,9 @@ backend default { # Sort magi. sub vcl_recv { + if (req.url ~ "^/where" || req.url ~ "^/location") { + set req.url = "/api/public/location"; + } if (req.method != "GET" && req.method != "HEAD" && req.method != "PUT" && -- cgit v1.2.3 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') 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