redmage: disabled bot access to the site because it causes lags

This commit is contained in:
Tigor Hutasuhut 2024-09-22 16:26:19 +07:00
parent 1383b523bb
commit 2a057f24cf

View file

@ -14,6 +14,13 @@ in
{
config = mkIf (podman.enable && podman.${name}.enable) {
services.caddy.virtualHosts.${domain}.extraConfig = ''
@botForbidden header_regexp User-Agent "(?i)AdsBot-Google|Amazonbot|anthropic-ai|Applebot|Applebot-Extended|AwarioRssBot|AwarioSmartBot|Bytespider|CCBot|ChatGPT|ChatGPT-User|Claude-Web|ClaudeBot|cohere-ai|DataForSeoBot|Diffbot|FacebookBot|Google-Extended|GPTBot|ImagesiftBot|magpie-crawler|omgili|Omgilibot|peer39_crawler|PerplexityBot|YouBot"
handle @botForbidden {
respond /* "Access Denied" 403 {
close
}
}
reverse_proxy ${ip}:8080
'';