mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 04:39:23 +08:00
modules.services.nginx: block Amazonbot
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user