ваше сообщение

This commit is contained in:
2026-03-01 22:03:48 +03:00
parent 6723f14b41
commit 097b2a1980
337 changed files with 634 additions and 365 deletions

View File

@@ -166,6 +166,22 @@ http {
try_files $uri $uri/ =404;
}
# Gitea (прокси под тем же доменом — iframe на /repos грузит сюда, без порта 3001)
# ^~ — не проверять regex (location для .js/.css и т.д.), иначе /gitea/assets/*.js отдаётся с диска и 404
location ^~ /gitea/ {
client_max_body_size 1500m;
proxy_pass http://dapp-gitea:3000/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_redirect off;
proxy_http_version 1.1;
proxy_connect_timeout 120s;
proxy_send_timeout 1800s;
proxy_read_timeout 1800s;
}
# Основной location
location / {
# Rate limiting для основных страниц (отключено)
@@ -178,7 +194,7 @@ http {
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; font-src 'self' data:; connect-src 'self' wss:;" always;
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; font-src 'self' data:; connect-src 'self' wss:; frame-src 'self';" always;
add_header Permissions-Policy "geolocation=(), microphone=(), camera=()" always;
}