f3a8a38acd
web-platform-ci / Standalone decision service (no cloud credentials) (push) Has been cancelled
web-platform-ci / TypeScript, lint, unit, build (push) Has been cancelled
web-platform-ci / Playwright E2E (push) Has been cancelled
lekiwi-compatibility / cpu-compatibility (push) Has been cancelled
web-platform-ci / Standalone decision service (no cloud credentials) (pull_request) Has been cancelled
web-platform-ci / TypeScript, lint, unit, build (pull_request) Has been cancelled
web-platform-ci / Playwright E2E (pull_request) Has been cancelled
lekiwi-compatibility / cpu-compatibility (pull_request) Has been cancelled
集成同源 BYOK 会话隔离、精简模型设置、官方订阅入口和 HTTPS 发布运维;保留本地训练/调参与控制能力。同步 npm 版本及 CHANGELOG,记录公网真实 API 验收仍待用户凭据。
63 lines
2.9 KiB
Plaintext
63 lines
2.9 KiB
Plaintext
# Managed by CADWorld deployment, not a replacement for 1Panel's main config.
|
|
limit_req_zone $binary_remote_addr zone=cadworld_api:10m rate=10r/s;
|
|
server {
|
|
listen 80;
|
|
server_name cadworld-sim.robotquan.com;
|
|
location ^~ /.well-known/acme-challenge/ {
|
|
root /www/acme/cadworld-sim.robotquan.com;
|
|
default_type text/plain;
|
|
}
|
|
location / { return 301 https://cadworld-sim.robotquan.com$request_uri; }
|
|
}
|
|
server {
|
|
listen 443 ssl http2;
|
|
server_name cadworld-sim.robotquan.com;
|
|
ssl_certificate /www/ssl/cadworld-sim.robotquan.com/live/cadworld-sim.robotquan.com/fullchain.pem;
|
|
ssl_certificate_key /www/ssl/cadworld-sim.robotquan.com/live/cadworld-sim.robotquan.com/privkey.pem;
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
ssl_session_cache shared:CADWorldTLS:10m;
|
|
ssl_session_timeout 1d;
|
|
root /www/sites/cadworld-sim.robotquan.com/current;
|
|
index index.html;
|
|
autoindex off;
|
|
client_max_body_size 64k;
|
|
client_body_timeout 15s;
|
|
keepalive_timeout 30s;
|
|
server_tokens off;
|
|
add_header Strict-Transport-Security "max-age=31536000" always;
|
|
add_header X-Content-Type-Options nosniff always;
|
|
add_header Referrer-Policy no-referrer always;
|
|
add_header X-Frame-Options DENY always;
|
|
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval'; style-src 'self' 'unsafe-inline'; worker-src 'self' blob:; img-src 'self' data: blob:; font-src 'self' data:; connect-src 'self' blob:; object-src 'none'; base-uri 'self'; frame-ancestors 'none'; form-action 'none'" always;
|
|
# Hash assets cache; all headers remain inherited (no nested add_header).
|
|
set $cadworld_cache "no-cache";
|
|
if ($uri ~ ^/assets/) { set $cadworld_cache "public, max-age=31536000, immutable"; }
|
|
if ($uri ~ ^/pyodide/) { set $cadworld_cache "public, max-age=86400"; }
|
|
if ($uri ~ ^/api/) { set $cadworld_cache "no-store"; }
|
|
add_header Cache-Control $cadworld_cache always;
|
|
location ^~ /api/decision/v1/ {
|
|
access_log off;
|
|
limit_req zone=cadworld_api burst=20 nodelay;
|
|
limit_req_status 429;
|
|
proxy_pass http://127.0.0.1:8768;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host cadworld-sim.robotquan.com;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_set_header X-Forwarded-Proto https;
|
|
proxy_set_header Forwarded "";
|
|
proxy_set_header Connection "";
|
|
proxy_connect_timeout 5s;
|
|
proxy_read_timeout 70s;
|
|
proxy_send_timeout 15s;
|
|
proxy_buffering off;
|
|
proxy_hide_header Cache-Control;
|
|
}
|
|
location ^~ /api/ { return 404; }
|
|
location ^~ /physics/ { return 404; }
|
|
location = /tuning.html { return 404; }
|
|
location ~ /\. { return 404; }
|
|
location ~ \.wasm$ { types { application/wasm wasm; } try_files $uri =404; }
|
|
location / { try_files $uri $uri/ =404; }
|
|
}
|