@cryptotaxi247 / infra-1 / commits / 8db961ea

hydra-proxy: allow anubis bypass for build downloads

Martin Weinelt committed May 31, 2025 at 01:44 UTC 8db961ea98c5e31f790c0d46f2c2e153de05f328
1 file changed +17 -1
build/hydra-proxy.nix
+17 -1
@@ -38,10 +38,22 @@
38 worker_processes auto;
39 '';
40
41 + appendHttpConfig = ''
42 + map $http_x_from $upstream {
43 + default "anubis";
44 + nix.dev-Uogho3gi "hydra-server";
45 + }
46 + '';
47 +
48 eventsConfig = ''
49 worker_connections 1024;
50 '';
51
52 + upstreams = {
53 + anubis.servers."127.0.0.1:3001" = { };
54 + hydra-server.servers."127.0.0.1:3000" = { };
55 + };
56 +
57 virtualHosts."hydra.nixos.org" = {
58 forceSSL = true;
59 enableACME = true;
@@ -64,7 +76,11 @@
76 '';
77
78 locations."/" = {
67 - proxyPass = "http://127.0.0.1:3001";
79 + proxyPass = "http://anubis";
80 + };
81 +
82 + locations."~ ^/build/\\d+/download/" = {
83 + proxyPass = "http://hydra-server";
84 };
85
86 locations."/static/" = {