Spaces:
Sleeping
Sleeping
File size: 1,512 Bytes
9bc686b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | server {
listen 80;
server_name localhost;
# Increase body size limit for large enrollment image uploads
client_max_body_size 50M;
# Proxy API requests to backend
location /api {
proxy_pass http://backend:8000;
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 $scheme;
proxy_cache_bypass $http_upgrade;
}
# Proxy OpenAPI Documentation to backend
location /docs {
proxy_pass http://backend:8000/docs;
proxy_set_header Host $host;
}
location /openapi.json {
proxy_pass http://backend:8000/openapi.json;
proxy_set_header Host $host;
}
location /redoc {
proxy_pass http://backend:8000/redoc;
proxy_set_header Host $host;
}
# Proxy all other routes to Next.js frontend
location / {
proxy_pass http://frontend: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_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cache_bypass $http_upgrade;
}
}
|