Add HTTPS reverse proxy guide and PNG icons for real PWA install.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
# Trading Studio — Nginx HTTPS 反向代理
|
||||
# 将 https://你的域名或IP 转发到本机 Gradio 5683
|
||||
#
|
||||
# 安装步骤见 DEPLOY.md「PWA 安装与 HTTPS」
|
||||
|
||||
# HTTP 自动跳转 HTTPS(可选,不需要可删除此 server 块)
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name trading.local _;
|
||||
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name trading.local _;
|
||||
|
||||
# 自签证书路径(先用 scripts/gen_ssl_cert.sh 生成)
|
||||
ssl_certificate /etc/nginx/ssl/trading_studio.crt;
|
||||
ssl_certificate_key /etc/nginx/ssl/trading_studio.key;
|
||||
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
|
||||
client_max_body_size 200M;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:5683;
|
||||
proxy_http_version 1.1;
|
||||
|
||||
# Gradio WebSocket 必需
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
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_read_timeout 86400s;
|
||||
proxy_send_timeout 86400s;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user