guix-commits
[Top][All Lists]
Advanced

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

01/02: hydra: bayfront: Remove 'Last-Modified' and 'ETag' headers for 10


From: Ludovic Courtès
Subject: 01/02: hydra: bayfront: Remove 'Last-Modified' and 'ETag' headers for 10years.guix.
Date: Mon, 12 Sep 2022 17:10:55 -0400 (EDT)

civodul pushed a commit to branch master
in repository maintenance.

commit fa20040ce50f8e70a4b304779a8d7855f34787e6
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Mon Sep 12 22:57:06 2022 +0200

    hydra: bayfront: Remove 'Last-Modified' and 'ETag' headers for 10years.guix.
    
    See <http://issues.guix.gnu.org/37207> for context.
    
    * hydra/bayfront.scm (%disable-last-modified-header): New variable.
    (%ten-years-of-guix-nginx-servers): Use it for both the HTTP and the
    HTTPS server.
---
 hydra/bayfront.scm | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/hydra/bayfront.scm b/hydra/bayfront.scm
index e2aece4..27a9ed7 100644
--- a/hydra/bayfront.scm
+++ b/hydra/bayfront.scm
@@ -421,12 +421,21 @@ access_log   /var/log/nginx/guix-hpc.access.log;"))
              "access_log /var/log/nginx/guix-hpc.access.log;"))
       (locations common-locations)))))
 
+(define %disable-last-modified-header
+  ;; TODO This works around NGinx using the epoch for the
+  ;; Last-Modified date, as well as the etag.
+  ;; See http://issues.guix.gnu.org/37207
+  '("add_header Last-Modified \"\";"
+    "if_modified_since off;"
+    "etag off;"))
+
 (define %ten-years-of-guix-nginx-servers
   (list (nginx-server-configuration
          (server-name '("10years.guix.gnu.org"))
          (listen '("80" "[::]:80"))
          (raw-content
-          '("
+          `(,@%disable-last-modified-header
+            "
 access_log   /var/log/nginx/ten-years.access.log;
 
 # Limit embedding in HTML frames.
@@ -444,7 +453,8 @@ add_header X-Frame-Options SAMEORIGIN;"))
          (ssl-certificate-key 
"/etc/letsencrypt/live/10years.guix.gnu.org/privkey.pem")
          (root "/srv/ten-years-of-guix")
          (raw-content
-          (list %common-tls-options
+          (list (cons %common-tls-options
+                      %disable-last-modified-header)
                 "access_log /var/log/nginx/ten-years.access.log;")))))
 
 (define %logs.guix.gnu.org-nginx-servers



reply via email to

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