aboutsummaryrefslogtreecommitdiffstats
path: root/web/etc
diff options
context:
space:
mode:
authorJoachim Tingvold <joachim@tingvold.com>2016-03-25 15:51:28 +0100
committerroot <root@yoda.tg16.gathering.org>2016-03-25 16:35:40 +0100
commit23fabb7c1476a7f1ef3c00ff7e95eed4f7daa190 (patch)
tree425e30091d7a6d5bea23919e08511c197a5d2d67 /web/etc
parent1670071c058a2676a4a880a93acd57b35d6dc24e (diff)
parent875f3e404537de55d5b03abd3b0b9bec58c34d49 (diff)
Merge branch 'master' of https://github.com/tech-server/tgmanage
Diffstat (limited to 'web/etc')
-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;
+ }
}