Skip to content

Commit 8f70353

Browse files
committed
hydra-proxy: allow anubis bypass for nix.dev
1 parent cd67749 commit 8f70353

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

build/hydra-proxy.nix

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,22 @@
3838
worker_processes auto;
3939
'';
4040

41+
appendHttpConfig = ''
42+
map $http_x_from $upstream {
43+
default "anubis";
44+
nix.dev-Uogho3gi "hydra-server";
45+
}
46+
'';
47+
4148
eventsConfig = ''
4249
worker_connections 1024;
4350
'';
4451

52+
upstreams = {
53+
anubis.servers."127.0.0.1:3001" = { };
54+
hydra-server.servers."127.0.0.1:3000" = { };
55+
};
56+
4557
virtualHosts."hydra.nixos.org" = {
4658
forceSSL = true;
4759
enableACME = true;
@@ -64,7 +76,7 @@
6476
'';
6577

6678
locations."/" = {
67-
proxyPass = "http://127.0.0.1:3001";
79+
proxyPass = "http://$upstream";
6880
};
6981

7082
locations."/static/" = {

0 commit comments

Comments
 (0)