pluto: allow missing trailing slashes for prometheus/grafana
The status.nixos.org site references to the services that way...
Martin Weinelt committed
Feb 26, 2024 at 23:05 UTC
0aa4820933979d37731b099e782bdd12e1b3ee0f
1 file changed
+2
-2
delft/pluto/nginx.nix
+2
-2
@@ -18,14 +18,14 @@
18
forceSSL = true;
19
default = true;
20
locations."/".return = "302 https://status.nixos.org";
21
- locations."~ ^/prometheus/(?<action>[^\\s]+)" = {
21
+ locations."~ ^/prometheus/?(?<action>[^\\s]+)" = {
22
return = "301 https://prometheus.nixos.org/$action$is_args$args";
23
# TODO: Remove after https://github.com/NixOS/nixos-status/pull/21
24
extraConfig = ''
25
add_header Access-Control-Allow-Origin "*" always;
26
'';
27
};
28
- locations."~ ^/grafana/(?<action>[^\\s]+)".return = "301 https://grafana.nixos.org/$action$is_args$args";
28
+ locations."~ ^/grafana/?(?<action>[^\\s]+)".return = "301 https://grafana.nixos.org/$action$is_args$args";
29
};
30
31
virtualHosts."prometheus.nixos.org" = {