feat: block crawlers from production webapp

This commit is contained in:
3252a8
2026-05-30 21:25:03 +03:00
parent acc222da41
commit 3541f2f78b
8 changed files with 86 additions and 0 deletions
+11
View File
@@ -23,6 +23,13 @@ server {
return 200 "ok\n";
}
location = /robots.txt {
expires 1h;
add_header Cache-Control "public, max-age=3600";
add_header X-Robots-Tag "noindex, nofollow, noarchive";
try_files /robots.txt =404;
}
location /api/ {
proxy_pass http://backend:8081;
proxy_http_version 1.1;
@@ -89,23 +96,27 @@ server {
location ~* ^/subscription_webapp(_admin)?\.(min\.)?[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]\.(css|js)$ {
expires off;
add_header Cache-Control "public, max-age=31536000, immutable";
add_header X-Robots-Tag "noindex, nofollow, noarchive";
try_files $uri =404;
}
location ~* ^/subscription_webapp(_admin)?\.(css|js)$ {
expires off;
add_header Cache-Control "no-cache";
add_header X-Robots-Tag "noindex, nofollow, noarchive";
try_files $uri =404;
}
location ~* \.(css|js|png|jpg|jpeg|gif|ico|svg|webp)$ {
expires 30d;
add_header Cache-Control "public";
add_header X-Robots-Tag "noindex, nofollow, noarchive";
try_files $uri =404;
}
location / {
add_header Cache-Control "no-cache";
add_header X-Robots-Tag "noindex, nofollow, noarchive";
try_files $uri /index.html;
}
}