Skip to content

Commit a770c2b

Browse files
authored
Pass X-From header when reverse-proxying hydra (#1152)
1 parent 92f1d06 commit a770c2b

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

_redirects

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,5 @@
3737

3838
/permalink/stub-ld /guides/faq#how-to-run-non-nix-executables 301
3939
/manual/nix /reference/nix-manual 200
40-
/manual/nix/unstable/* https://hydra.nixos.org/job/nix/master/manual/latest/download/1/manual/:splat 200
41-
/manual/nix/development/* https://hydra.nixos.org/job/nix/master/manual/latest/download/1/manual/:splat 200
4240
/tutorials/nixos/continuous-integration-github-actions /guides/recipes/continuous-integration-github-actions 301
4341
/guides/recipes/autoformatting /guides/faq#how-to-format-nix-language-code-automatically 301

default.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ let
7979
mkdir -p $out/manual/nix
8080
cp -R build/html/* $out/
8181
cp build/latex/nix-dev.pdf $out/
82+
cp netlify.toml $out/
8283
'' + lib.optionalString withManuals ''
8384
${lib.concatStringsSep "\n" (lib.mapAttrsToList release releases.nixReleases)}
8485
${lib.concatStringsSep "\n" (lib.mapAttrsToList mutableRedirect releases.mutableNixManualRedirects)}

netlify.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[[redirects]]
2+
from = "/manual/nix/unstable/*"
3+
to = "https://hydra.nixos.org/job/nix/master/manual/latest/download/1/manual/:splat"
4+
status = 200
5+
force = true
6+
[redirects.headers]
7+
X-From = "nix.dev-Uogho3gi"
8+
9+
[[redirects]]
10+
from = "/manual/nix/development/*"
11+
to = "https://hydra.nixos.org/job/nix/master/manual/latest/download/1/manual/:splat"
12+
status = 200
13+
force = true
14+
[redirects.headers]
15+
X-From = "nix.dev-Uogho3gi"

0 commit comments

Comments
 (0)