guix-commits
[Top][All Lists]
Advanced

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

01/03: hydra: bayfront: Have clients cache fonts aggressively.


From: Ludovic Courtès
Subject: 01/03: hydra: bayfront: Have clients cache fonts aggressively.
Date: Mon, 18 Dec 2023 09:01:58 -0500 (EST)

civodul pushed a commit to branch master
in repository maintenance.

commit 0c79d0babfffb2f3ba7c9a400f3889d74d8e8bdc
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Mon Dec 18 14:52:15 2023 +0100

    hydra: bayfront: Have clients cache fonts aggressively.
    
    * hydra/bayfront.scm (%hpc.guix.info-nginx-servers): Add location block
    for /static/fonts.
---
 hydra/bayfront.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/hydra/bayfront.scm b/hydra/bayfront.scm
index a2dbc29..c6e4452 100644
--- a/hydra/bayfront.scm
+++ b/hydra/bayfront.scm
@@ -429,7 +429,11 @@ add_header X-Frame-Options SAMEORIGIN;\n")
            (uri "~ /static/images/sort_.*\\.png")
            (body '("proxy_pass http://localhost:5000;";)))
 
-          ;; Improve caching for CSS, images, etc.
+          ;; Improve caching for CSS, images, fonts, etc.
+          (nginx-location-configuration
+           (uri "/static/fonts")                  ;.ttf files don't change
+           (body `("add_header Cache-Control max-age="
+                   ,(number->string (* 3600 24 30)) ";")))
           (nginx-location-configuration
            (uri "/static")
            (body '("add_header Cache-Control max-age=21600;")))



reply via email to

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