Spaces:
Running
Running
Download deploy/nginx.conf from Leon4gr45/brain: direct link, hf CLI and curl.
- Browser
- Download file 1.46 kB
-
https://huggingface.co/spaces/Leon4gr45/brain/resolve/main/deploy/nginx.conf
- Command line
-
hf download hf://spaces/Leon4gr45/brain/deploy/nginx.conf
-
curl -L -o nginx.conf https://huggingface.co/spaces/Leon4gr45/brain/resolve/main/deploy/nginx.conf
1.46 kB
| # The HF ingress terminates TLS; preserve its explicit protocol indication. | |
| map $http_x_forwarded_proto $brainapi_forwarded_proto { | |
| default $scheme; | |
| https https; | |
| http http; | |
| } | |
| server { | |
| listen 7860 default_server; | |
| listen [::]:7860 default_server; | |
| server_name _; | |
| client_max_body_size 100M; | |
| location ~ ^/brains/[^/]+/mcp(/.*)?$ { | |
| proxy_pass http://127.0.0.1:8001; | |
| proxy_http_version 1.1; | |
| 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 $brainapi_forwarded_proto; | |
| proxy_set_header Connection ""; | |
| proxy_buffering off; | |
| proxy_cache off; | |
| chunked_transfer_encoding off; | |
| } | |
| location ~ ^/(mcp(/|$)|mcp-oauth/|authorize$|token$|register$|\.well-known/) { | |
| proxy_pass http://127.0.0.1:8001; | |
| proxy_http_version 1.1; | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Forwarded-Proto $brainapi_forwarded_proto; | |
| proxy_set_header Connection ""; | |
| proxy_buffering off; | |
| } | |
| location / { | |
| proxy_pass http://127.0.0.1:8000; | |
| proxy_http_version 1.1; | |
| 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 $brainapi_forwarded_proto; | |
| } | |
| } | |