| server { |
| listen 7860; |
| server_name _; |
| access_log /dev/stdout; |
| error_log /dev/stderr warn; |
|
|
| add_header X-Content-Type-Options "nosniff" always; |
| add_header X-Frame-Options "DENY" 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' https:; connect-src 'self' https: wss:; frame-ancestors 'none';" always; |
|
|
| location ~ ^/(app|data|\.git|\.env|\.openclaw|node_modules|tmp)/ { |
| return 403; |
| } |
|
|
| client_max_body_size 10m; |
|
|
| location / { |
| proxy_pass http://127.0.0.1:18789; |
| proxy_http_version 1.1; |
| 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 https; |
| proxy_set_header X-Forwarded-Host $host; |
| |
| proxy_read_timeout 86400s; |
| proxy_send_timeout 86400s; |
| proxy_connect_timeout 75s; |
| proxy_buffering off; |
| proxy_cache off; |
| } |
| } |