modules.services.nginx: block Amazonbot

This commit is contained in:
2024-10-24 23:20:38 +08:00
parent fd146e244c
commit 78ace37bf7

View File

@@ -533,6 +533,12 @@ inputs:
let inherit (site.value.global) charset; in
if (charset != null) then [ "charset ${charset};" ] else []
)
# block some bots as it will grab all pages (including all commits from gitea)
++ [ ''
if ($http_user_agent ~* "Amazonbot|ClaudeBot") {
return 403;
}
'']
);
listen = map
(listen: