From 5c00567283235d899178496c9202b31c43c3d31b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 10 Jan 2023 00:18:16 +0100 Subject: [PATCH] hedgedoc: reduce log spam, disallow scraping --- hosts/hedgedoc/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hosts/hedgedoc/default.nix b/hosts/hedgedoc/default.nix index e2327d52..96aec0d6 100644 --- a/hosts/hedgedoc/default.nix +++ b/hosts/hedgedoc/default.nix @@ -34,6 +34,7 @@ tlsca = "/etc/ssl/certs/ca-certificates.crt"; useridField = "uid"; }; + loglevel = "warn"; protocolUseSSL = true; sessionSecret = "$sessionSecret"; }; @@ -58,7 +59,10 @@ default = true; forceSSL = true; enableACME = true; - locations."/".proxyPass = "http://localhost:${toString config.services.hedgedoc.settings.port}"; + locations = { + "^~ /robots.txt".return = "200 'User-agent: *\\nDisallow: /'"; + "/".proxyPass = "http://localhost:${toString config.services.hedgedoc.settings.port}"; + }; }; }; };