Spaces:
Running
Running
server { | |
listen 3000; | |
server_name localhost; | |
location / { | |
root /usr/share/nginx/html; | |
index index.html index.htm; | |
try_files $uri $uri/ /index.html; | |
} | |
# Proxy API requests to your backend | |
location /api/ { | |
proxy_pass https://humblebeeai-al-ghazali-rag-retrieval-api.hf.space/; | |
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; | |
# Add proxy buffer configuration to avoid disk writes | |
proxy_buffers 16 16k; | |
proxy_buffer_size 16k; | |
} | |
error_page 500 502 503 504 /50x.html; | |
location = /50x.html { | |
root /usr/share/nginx/html; | |
} | |
} |