feat: Adiciona snippets well-known (robots, security, humans, ads)

This commit is contained in:
João Pedro Toledo Goncalves 2026-02-04 19:24:03 -03:00
parent ff6e4a339d
commit b6997959e9
5 changed files with 62 additions and 0 deletions

13
snippets/ads.txt.conf Normal file
View File

@ -0,0 +1,13 @@
# Ads.txt - Vendedores Autorizados de Anúncios
# Função: Lista quem está autorizado a vender o inventário de anúncios do site para evitar fraudes.
location = /ads.txt {
allow all;
log_not_found off;
access_log off;
try_files /ads.txt @proxy_ads;
}
location @proxy_ads {
include snippets/proxy_params.conf;
proxy_pass $upstream_proto://$upstream_app;
}

13
snippets/humans.txt.conf Normal file
View File

@ -0,0 +1,13 @@
# Humans.txt - Créditos e Tecnologias
# Função: Um arquivo para humanos que lista quem construiu o site e as ferramentas usadas.
location = /humans.txt {
allow all;
log_not_found off;
access_log off;
try_files /humans.txt @proxy_humans;
}
location @proxy_humans {
include snippets/proxy_params.conf;
proxy_pass $upstream_proto://$upstream_app;
}

16
snippets/robots.txt.conf Normal file
View File

@ -0,0 +1,16 @@
# Robots.txt - Controle de Crawler
# Função: Indica para robôs (Google, Bing, IA) o que pode ou não ser indexado.
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
# Exemplo de conteúdo direto (opcional):
# return 200 "User-agent: *\nDisallow: /admin/\nSitemap: $scheme://$host/sitemap.xml";
try_files /robots.txt @proxy_robots;
}
location @proxy_robots {
# Caso não exista no proxy, tenta buscar no backend
include snippets/proxy_params.conf;
proxy_pass $upstream_proto://$upstream_app;
}

View File

@ -0,0 +1,13 @@
# Security.txt - Reporte de Vulnerabilidades
# Função: Padroniza como pesquisadores de segurança devem contatar o responsável pelo site.
location = /.well-known/security.txt {
allow all;
log_not_found off;
access_log off;
try_files /.well-known/security.txt /security.txt @proxy_security;
}
location @proxy_security {
include snippets/proxy_params.conf;
proxy_pass $upstream_proto://$upstream_app;
}

7
snippets/well_known.conf Normal file
View File

@ -0,0 +1,7 @@
# Agregador de Arquivos de Identificação e Controle (Well-Known / Root Files)
# Função: Inclui todos os snippets padrão de identificação em um único comando.
include snippets/robots.txt.conf;
include snippets/security.txt.conf;
include snippets/humans.txt.conf;
include snippets/ads.txt.conf;