aboutsummaryrefslogtreecommitdiffstats
path: root/web/etc/varnish/nms.vcl
diff options
context:
space:
mode:
Diffstat (limited to 'web/etc/varnish/nms.vcl')
-rw-r--r--web/etc/varnish/nms.vcl5
1 files changed, 5 insertions, 0 deletions
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;
+ }
}