From 1fcd8272303e1729b3ae31b4f8ceac5fc2e13539 Mon Sep 17 00:00:00 2001 From: sterni Date: Fri, 24 Jan 2025 22:17:21 +0100 Subject: [PATCH] feat(sterni/machines/ingeborg): disallow crawling of /tmp Change-Id: Ic104ff7837c5f728b4e9b33b2ed2ed1ceba8103e Reviewed-on: https://cl.tvl.fyi/c/depot/+/13054 Autosubmit: sterni Reviewed-by: sterni Tested-by: BuildkiteCI --- users/sterni/machines/ingeborg/http/sterni.lv.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/users/sterni/machines/ingeborg/http/sterni.lv.nix b/users/sterni/machines/ingeborg/http/sterni.lv.nix index cba56ce4f..d71ced6df 100644 --- a/users/sterni/machines/ingeborg/http/sterni.lv.nix +++ b/users/sterni/machines/ingeborg/http/sterni.lv.nix @@ -28,6 +28,12 @@ in }; # TODO(sterni): tmp.sterni.lv locations."/tmp/".root = toString /srv/http; + extraConfig = '' + location = /robots.txt { + add_header Content-Type text/plain; + return 200 "User-agent: *\nDisallow: /tmp\n"; + } + ''; }; }; }