From b9559cf5cee22c84914191e68ecfc97bffa35f0f Mon Sep 17 00:00:00 2001 From: Rouven Seifert Date: Wed, 6 Mar 2024 20:59:11 +0100 Subject: [PATCH] pad: wiki: add robots.txt --- modules/hedgedoc.nix | 6 ++++++ modules/wiki/fsr.nix | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/modules/hedgedoc.nix b/modules/hedgedoc.nix index 3061aba..5a9a217 100644 --- a/modules/hedgedoc.nix +++ b/modules/hedgedoc.nix @@ -74,6 +74,12 @@ in proxyPass = "http://[::1]:${toString config.services.hedgedoc.settings.port}"; proxyWebsockets = true; }; + locations."/robots.txt" = { + extraConfig = '' + add_header Content-Type text/plain; + return 200 "User-agent: *\nDisallow: /\n"; + ''; + }; }; }; }; diff --git a/modules/wiki/fsr.nix b/modules/wiki/fsr.nix index f8fe604..b078cf1 100644 --- a/modules/wiki/fsr.nix +++ b/modules/wiki/fsr.nix @@ -104,6 +104,12 @@ in virtualHosts.${domain} = { enableACME = true; forceSSL = true; + locations."/robots.txt" = { + extraConfig = '' + add_header Content-Type text/plain; + return 200 "User-agent: *\nDisallow: /\n"; + ''; + }; locations."/" = { proxyPass = "http://127.0.0.1:${toString listenPort}"; proxyWebsockets = true;