Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hydra-proxy: restrict restart-abort for python-env-venv eval #450

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion build/hydra-proxy.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -41,6 +42,8 @@
locations."/static/" = {
alias = "${config.services.hydra-dev.package}/libexec/hydra/root/static/";
};

locations."/eval/1807542/restart-aborted".return = "403";
};
};

Expand Down
29 changes: 29 additions & 0 deletions build/nginx-error-pages/403.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!DOCTYPE html>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Access forbidden</title>
<style type="text/css" media="screen">
body {
font-family: Helvetica, Arial, sans-serif;
color: rgba(0, 0, 0, 0.7);
}
</style>
</head>

<body>
<center>
<img src="/apache-errors/warning.png" alt="Warning" />
<p>Access to that resource has been restricted!</p>
<p style="font-size: 90%;">
<a href="https://nixos.org/">NixOS Homepage</a> |
<a href="https://monitoring.nixos.org/prometheus/alerts">System Alerts</a> |
<a href="https://monitoring.nixos.org/grafana/">Dashboards</a> |
<a href="https://github.com/NixOS/nixpkgs/labels/infrastructure">Related Issues</a>
</p>
</center>
</body>

</html>
Loading