pad: wiki: add robots.txt

This commit is contained in:
Rouven Seifert 2024-03-06 20:59:11 +01:00
parent c04e11a958
commit b9559cf5ce
Signed by: rouven.seifert
GPG key ID: B95E8FE6B11C4D09
2 changed files with 12 additions and 0 deletions

View file

@ -74,6 +74,12 @@ in
proxyPass = "http://[::1]:${toString config.services.hedgedoc.settings.port}"; proxyPass = "http://[::1]:${toString config.services.hedgedoc.settings.port}";
proxyWebsockets = true; proxyWebsockets = true;
}; };
locations."/robots.txt" = {
extraConfig = ''
add_header Content-Type text/plain;
return 200 "User-agent: *\nDisallow: /\n";
'';
};
}; };
}; };
}; };

View file

@ -104,6 +104,12 @@ in
virtualHosts.${domain} = { virtualHosts.${domain} = {
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
locations."/robots.txt" = {
extraConfig = ''
add_header Content-Type text/plain;
return 200 "User-agent: *\nDisallow: /\n";
'';
};
locations."/" = { locations."/" = {
proxyPass = "http://127.0.0.1:${toString listenPort}"; proxyPass = "http://127.0.0.1:${toString listenPort}";
proxyWebsockets = true; proxyWebsockets = true;