diff --git a/build/hydra-proxy.nix b/build/hydra-proxy.nix index 5c1ab015..83bf1ee3 100644 --- a/build/hydra-proxy.nix +++ b/build/hydra-proxy.nix @@ -27,8 +27,9 @@ enableACME = true; extraConfig = '' + error_page 403 /403.html; error_page 503 /503.html; - location = /503.html { + location ~ ^/(403|503).html$ { root ${./nginx-error-pages}; internal; } @@ -41,6 +42,8 @@ locations."/static/" = { alias = "${config.services.hydra-dev.package}/libexec/hydra/root/static/"; }; + + locations."/eval/1807542/restart-aborted".return = "403"; }; }; diff --git a/build/nginx-error-pages/403.html b/build/nginx-error-pages/403.html new file mode 100644 index 00000000..087ff542 --- /dev/null +++ b/build/nginx-error-pages/403.html @@ -0,0 +1,29 @@ + + + + + + + Access forbidden + + + + +
+ Warning +

Access to that resource has been restricted!

+

+ NixOS Homepage | + System Alerts | + Dashboards | + Related Issues +

+
+ + +