Lcmind commited on
Commit
6ad0b3c
·
1 Parent(s): e56a4bd

fix: add proxy headers support for HF Spaces

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -2
Dockerfile CHANGED
@@ -61,5 +61,5 @@ EXPOSE 7860
61
  HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
62
  CMD python -c "import requests; requests.get('http://localhost:7860/', timeout=5)"
63
 
64
- # Run FastAPI directly on port 7860 (HF Spaces standard)
65
- CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
61
  HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
62
  CMD python -c "import requests; requests.get('http://localhost:7860/', timeout=5)"
63
 
64
+ # Run FastAPI directly on port 7860 with proxy headers support
65
+ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--proxy-headers", "--forwarded-allow-ips", "*"]