guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: nginx: Provide 'Cache-Control' headers in narinfo responses.


From: Ludovic Courtès
Subject: 01/01: nginx: Provide 'Cache-Control' headers in narinfo responses.
Date: Wed, 16 Mar 2016 14:41:29 +0000

civodul pushed a commit to branch master
in repository maintenance.

commit a320f7235930df135e2767c2e057cf6df58bbd65
Author: Ludovic Courtès <address@hidden>
Date:   Wed Mar 16 15:39:29 2016 +0100

    nginx: Provide 'Cache-Control' headers in narinfo responses.
---
 hydra/nginx/hydra.gnu.org-locations.conf |    4 ++++
 hydra/nginx/mirror-locations.conf        |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/hydra/nginx/hydra.gnu.org-locations.conf 
b/hydra/nginx/hydra.gnu.org-locations.conf
index 5ed6da2..0a59e48 100644
--- a/hydra/nginx/hydra.gnu.org-locations.conf
+++ b/hydra/nginx/hydra.gnu.org-locations.conf
@@ -66,6 +66,10 @@ location ~ \.narinfo$ {
     proxy_cache_valid 200 7d;   # cache hits for 7 days.
     proxy_cache_valid any 1m;   # cache misses/others for 1 min.
 
+    # Add 'Expires' and 'Cache-Control' response headers so clients
+    # such as 'guix substitute' know how long they can cache it.
+    expires 24h;
+
     proxy_ignore_client_abort on;
 
     # We need to hide and ignore the Set-Cookie header
diff --git a/hydra/nginx/mirror-locations.conf 
b/hydra/nginx/mirror-locations.conf
index 3e60d38..5370b3c 100644
--- a/hydra/nginx/mirror-locations.conf
+++ b/hydra/nginx/mirror-locations.conf
@@ -62,6 +62,10 @@ location ~ \.narinfo$ {
     proxy_cache_valid 200 90d;  # cache hits for 3 months.
     proxy_cache_valid any 1h;   # cache misses/others for 1h.
 
+    # Add 'Expires' and 'Cache-Control' response headers so clients
+    # such as 'guix substitute' know how long they can cache it.
+    expires 7d;
+
     proxy_ignore_client_abort on;
 
     # We need to hide and ignore the Set-Cookie header



reply via email to

[Prev in Thread] Current Thread [Next in Thread]