summaryrefslogtreecommitdiffstats
path: root/web/nginx.conf.example
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-11-08 12:28:48 +0100
committersalmonik <salmonik@tuta.io>2026-11-08 12:28:48 +0100
commit8681fcf565643f67a36cb1fe571fac7843d2b6af (patch)
tree1f022edb267281da0a2fd0fde3b5336293f14cea /web/nginx.conf.example
parentweb: match the desktop layout and remove play-money copy (diff)
downloadzagan-bet-8681fcf565643f67a36cb1fe571fac7843d2b6af.tar.gz
zagan-bet-8681fcf565643f67a36cb1fe571fac7843d2b6af.zip
web: disallow crawlers and quiet the game port
Adds robots.txt with Disallow: / plus noindex/X-Robots-Tag on the site and app. The v5 server treats an HTTP request as a malformed frame, closes silently before HELLO, and suppresses the common TLS scanner noise. Deploy now verifies robots.txt.
Diffstat (limited to 'web/nginx.conf.example')
-rw-r--r--web/nginx.conf.example11
1 files changed, 11 insertions, 0 deletions
diff --git a/web/nginx.conf.example b/web/nginx.conf.example
index d440ab5..8dbde64 100644
--- a/web/nginx.conf.example
+++ b/web/nginx.conf.example
@@ -45,6 +45,7 @@ server {
45 location /play/ { 45 location /play/ {
46 try_files $uri $uri/ /play/index.html; 46 try_files $uri $uri/ /play/index.html;
47 add_header Cache-Control "no-cache"; 47 add_header Cache-Control "no-cache";
48 add_header X-Robots-Tag "noindex, nofollow, noarchive" always;
48 add_header X-Frame-Options "DENY" always; 49 add_header X-Frame-Options "DENY" always;
49 add_header X-Content-Type-Options "nosniff" always; 50 add_header X-Content-Type-Options "nosniff" always;
50 } 51 }
@@ -62,6 +63,14 @@ server {
62 proxy_send_timeout 3600s; 63 proxy_send_timeout 3600s;
63 } 64 }
64 65
66 # Ask crawlers and scanners to stay out, and never index a page.
67 location = /robots.txt {
68 default_type text/plain;
69 try_files $uri =404;
70 add_header Cache-Control "public, max-age=3600";
71 add_header X-Robots-Tag "noindex, nofollow, noarchive" always;
72 }
73
65 # The page rescans bin/ on every request, so don't cache it. 74 # The page rescans bin/ on every request, so don't cache it.
66 location = /index.php { 75 location = /index.php {
67 include fastcgi_params; 76 include fastcgi_params;
@@ -70,6 +79,7 @@ server {
70 fastcgi_pass unix:/run/php/php-fpm.sock; 79 fastcgi_pass unix:/run/php/php-fpm.sock;
71 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 80 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
72 add_header Cache-Control "no-cache"; 81 add_header Cache-Control "no-cache";
82 add_header X-Robots-Tag "noindex, nofollow, noarchive" always;
73 } 83 }
74 84
75 # The newest-version feed read by install.sh and install.ps1. 85 # The newest-version feed read by install.sh and install.ps1.
@@ -78,6 +88,7 @@ server {
78 fastcgi_pass unix:/run/php/php-fpm.sock; 88 fastcgi_pass unix:/run/php/php-fpm.sock;
79 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 89 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
80 add_header Cache-Control "no-store"; 90 add_header Cache-Control "no-store";
91 add_header X-Robots-Tag "noindex, nofollow, noarchive" always;
81 } 92 }
82 93
83 # Stable installers: always revalidate so a fix reaches the next download. 94 # Stable installers: always revalidate so a fix reaches the next download.