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 hp


From: Ludovic Courtès
Subject: 01/02: hydra: bayfront: Remove 'Last-Modified' and 'ETag' headers for hpc.guix.info.
Date: Fri, 30 Sep 2022 06:01:14 -0400 (EDT)

civodul pushed a commit to branch master
in repository maintenance.

commit e574f98ef2d13927bc6f37b651c8b3bb75ad5990
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Sep 30 11:56:36 2022 +0200

    hydra: bayfront: Remove 'Last-Modified' and 'ETag' headers for 
hpc.guix.info.
    
    * hydra/bayfront.scm (%hpc.guix.info-nginx-servers): Use it under the
    'raw-content' field of servers.
---
 hydra/bayfront.scm | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/hydra/bayfront.scm b/hydra/bayfront.scm
index bc5e1f0..707df54 100644
--- a/hydra/bayfront.scm
+++ b/hydra/bayfront.scm
@@ -304,6 +304,14 @@ add_header Strict-Transport-Security max-age=15552000;
 # Limit embedding in HTML frames.
 add_header X-Frame-Options SAMEORIGIN;\n")
 
+(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 %hpc.guix.info-nginx-servers
   (let ((common-locations
          (list
@@ -350,7 +358,8 @@ add_header X-Frame-Options SAMEORIGIN;\n")
       (server-name '("hpc.guix.info"))
       (listen '("80" "[::]:80"))
       (raw-content
-       '("
+       `(,@%disable-last-modified-header
+         "
 access_log   /var/log/nginx/guix-hpc.access.log;
 
 # Limit embedding in HTML frames.
@@ -370,8 +379,9 @@ add_header X-Frame-Options SAMEORIGIN;"))
       (ssl-certificate-key "/etc/letsencrypt/live/hpc.guix.info/privkey.pem")
       (root "/srv/guix-hpc-web")
       (raw-content
-       (list %common-tls-options
-             "access_log /var/log/nginx/guix-hpc.access.log;"))
+       (append %disable-last-modified-header
+               (list %common-tls-options
+                     "access_log /var/log/nginx/guix-hpc.access.log;")))
       (locations common-locations)))))
 
 (define %guix-hpc.bordeaux.inria.fr-nginx-servers
@@ -421,14 +431,6 @@ 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"))



reply via email to

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