[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: hydra: bayfront: Increase precedence of /packages
From: |
Ludovic Courtès |
Subject: |
branch master updated: hydra: bayfront: Increase precedence of /packages and /themes locations. |
Date: |
Thu, 14 Dec 2023 08:47:25 -0500 |
This is an automated email from the git hooks/post-receive script.
civodul pushed a commit to branch master
in repository maintenance.
The following commit(s) were added to refs/heads/master by this push:
new f2c8be3 hydra: bayfront: Increase precedence of /packages and /themes
locations.
f2c8be3 is described below
commit f2c8be300c6e096e6ebf9fd53544e1cb06e8c640
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu Dec 14 14:46:13 2023 +0100
hydra: bayfront: Increase precedence of /packages and /themes locations.
This is a followup to 4f7edc0c5e5eba7ea2dd283100e66c0520795da9, which
had no effect due to the / location block taking precedence over the
rest.
* hydra/bayfront.scm (%packages.guix.gnu.org-nginx-servers): Move
/packages and /themes locations before /.
---
hydra/bayfront.scm | 54 +++++++++++++++++++++++++++++-------------------------
1 file changed, 29 insertions(+), 25 deletions(-)
diff --git a/hydra/bayfront.scm b/hydra/bayfront.scm
index 14ea44a..a2dbc29 100644
--- a/hydra/bayfront.scm
+++ b/hydra/bayfront.scm
@@ -892,31 +892,35 @@ proxy_set_header Via $via;"
%common-tls-options
"access_log /var/log/nginx/packages.access.log;"))
(locations
- (list
- (nginx-location-configuration
- (uri "/")
- (body '("proxy_pass http://packages;"
- "proxy_http_version 1.1;"
- "proxy_set_header Connection \"\";")))
-
- (nginx-location-configuration
- (uri "/packages")
- (body '("proxy_cache static;"
- "proxy_cache_valid 200 2h;" ;cache hits for a few hours
- "proxy_cache_valid any 5m;" ;cache misses/others for 5 min
-
- "add_header Cache-Control max-age=3600;")))
-
- ;; Improve caching for CSS, images, etc.
- (nginx-location-configuration
- (uri "/themes")
- (body '(;; Cache these files since that's always the first thing we
- ;; ask for.
- "proxy_cache static;"
- "proxy_cache_valid 200 12h;" ;cache hits for a while
- "proxy_cache_valid any 5m;" ;cache misses/others for 5 min
-
- "add_header Cache-Control max-age=21600;"))))))))
+ (let ((base '("proxy_pass http://packages;"
+ "proxy_http_version 1.1;"
+ "proxy_set_header Connection \"\";")))
+ (list
+ (nginx-location-configuration
+ (uri "/packages")
+ (body `(,@base
+ "proxy_cache static;"
+ "proxy_cache_valid 200 2h;" ;cache hits for a few hours
+ "proxy_cache_valid any 5m;" ;cache misses/others for 5 min
+
+ "add_header Cache-Control max-age=3600;")))
+
+ ;; Improve caching for CSS, images, etc.
+ (nginx-location-configuration
+ (uri "/themes")
+ (body `(,@base
+
+ ;; Cache these files since that's always the first thing we
+ ;; ask for.
+ "proxy_cache static;"
+ "proxy_cache_valid 200 12h;" ;cache hits for a while
+ "proxy_cache_valid any 5m;" ;cache misses/others for 5 min
+
+ "add_header Cache-Control max-age=21600;")))
+
+ (nginx-location-configuration
+ (uri "/")
+ (body base))))))))
(define %guix.gnu.org-http-nginx-servers
;; Redirect domains that don't explicitly support HTTP (below) to HTTPS.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: hydra: bayfront: Increase precedence of /packages and /themes locations.,
Ludovic Courtès <=