交付双端基础、实时联系人和隔离浏览器

This commit is contained in:
xhgit committed 2026-11-13 18:03:32 +08:00
1 parent 43687d5e7e
commit 67fef3ff87
59 files changed
+5094 -1

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
map $http_upgrade $xhchat_connection {
default upgrade;
'' close;
}
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
server_tokens off;
access_log off;
client_max_body_size 8k;
add_header Content-Security-Policy "default-src 'none'; script-src 'self'; style-src 'self'; connect-src 'self'; form-action 'self'; base-uri 'none'; frame-ancestors 'none'" always;
add_header Referrer-Policy no-referrer always;
add_header X-Content-Type-Options nosniff always;
add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always;
location /api/ {
proxy_pass http://api:8080;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $xhchat_connection;
proxy_read_timeout 90s;
}
location = /healthz { proxy_pass http://api:8080; }
location = /readyz { proxy_pass http://api:8080; }
location / { try_files $uri $uri/ =404; }
}