Spaces:
Sleeping
Sleeping
| worker_processes 1; | |
| pid /tmp/nginx.pid; | |
| error_log /tmp/nginx_error.log; | |
| events { | |
| worker_connections 1024; | |
| } | |
| http { | |
| access_log /tmp/nginx_access.log; | |
| client_body_temp_path /tmp/nginx_client_temp; | |
| proxy_temp_path /tmp/nginx_proxy_temp; | |
| client_max_body_size 50M; | |
| map $http_upgrade $connection_upgrade { | |
| default upgrade; | |
| '' close; | |
| } | |
| server { | |
| listen 7860; | |
| location / { | |
| # magentic-ui hardcodes a Host-header allowlist of only | |
| # localhost/127.0.0.1 (DNS-rebinding defense) with no override, | |
| # which rejects HF's proxy Host header outright. Rewrite it here | |
| # instead of patching magentic-ui's source. | |
| proxy_pass http://127.0.0.1:8081; | |
| proxy_set_header Host localhost; | |
| proxy_http_version 1.1; | |
| proxy_set_header Upgrade $http_upgrade; | |
| proxy_set_header Connection $connection_upgrade; | |
| proxy_read_timeout 3600s; | |
| proxy_send_timeout 3600s; | |
| } | |
| } | |
| } | |