summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2018-11-09 13:27:54 +0000
committerintrigeri <intrigeri@boum.org>2018-11-09 13:30:47 +0000
commitff34fce8d0dfb735b7346dabfcbce9da989b0495 (patch)
tree63ecf569dc54c5e2d258a8f95c17c338f6321bac
parent6810cc0c0c05c3332beccbbc3fb0f14db9da3446 (diff)
Website: let HTTP clients cache IDFs, UDFs and mirrors.json for up to 2 hours (refs: #14588).
This translates what we currently have for Apache in our .htaccess.
-rw-r--r--templates/website/nginx/site.erb4
1 files changed, 4 insertions, 0 deletions
diff --git a/templates/website/nginx/site.erb b/templates/website/nginx/site.erb
index 61e90cd..c73f821 100644
--- a/templates/website/nginx/site.erb
+++ b/templates/website/nginx/site.erb
@@ -79,6 +79,10 @@ server {
expires 1d;
}
+ location ~ /(?:(?:latest|upgrade)\.yml(?:\.pgp)?|mirrors\.json)$ {
+ add_header Cache-Control "max-age=7200, must-revalidate";
+ }
+
<%- if @cgi -%>
location /ikiwiki.cgi {
# Disable gzip (it makes scripts feel slower since they have to complete