Spaces:
Sleeping
Sleeping
| server { | |
| listen 7860; | |
| server_name _; | |
| # Frontend (Next.js standalone) | |
| location / { | |
| proxy_pass http://127.0.0.1:3000; | |
| 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_cache_bypass $http_upgrade; | |
| } | |
| # Backend API | |
| location /analyze { | |
| proxy_pass http://127.0.0.1:8000; | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_read_timeout 120s; | |
| client_max_body_size 20M; | |
| } | |
| location /chat { | |
| proxy_pass http://127.0.0.1:8000; | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_read_timeout 60s; | |
| } | |
| location /upload_and_chat { | |
| proxy_pass http://127.0.0.1:8000; | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_read_timeout 120s; | |
| client_max_body_size 20M; | |
| } | |
| location /mock-analyze { | |
| proxy_pass http://127.0.0.1:8000; | |
| proxy_set_header Host $host; | |
| } | |
| location /nutrition { | |
| proxy_pass http://127.0.0.1:8000; | |
| proxy_set_header Host $host; | |
| } | |
| location /exercise { | |
| proxy_pass http://127.0.0.1:8000; | |
| proxy_set_header Host $host; | |
| } | |
| location /docs { | |
| proxy_pass http://127.0.0.1:8000; | |
| proxy_set_header Host $host; | |
| } | |
| location /openapi.json { | |
| proxy_pass http://127.0.0.1:8000; | |
| proxy_set_header Host $host; | |
| } | |
| } | |