mirror of
https://github.com/OpenBMB/VoxCPM.git
synced 2026-09-20 10:53:32 +08:00
fix: trust forwarded headers for HTTPS file URLs
Add FORWARDED_ALLOW_IPS=* so uvicorn/Gradio trusts X-Forwarded-Proto from nginx in Docker (bridge network 172.x.x.x). Without this, Gradio generates http:// file URLs behind HTTPS proxies, causing mixed-content errors that block audio playback.
This commit is contained in:
@@ -32,6 +32,11 @@ services:
|
||||
environment:
|
||||
- GRADIO_SERVER_PORT=7860
|
||||
- GRADIO_ROOT_PATH=/webui # Matches nginx location block
|
||||
# Tell uvicorn to trust X-Forwarded-Proto from any IP (nginx in Docker
|
||||
# connects from 172.x.x.x, not 127.0.0.1). Without this, Gradio
|
||||
# generates http:// file URLs even when accessed over HTTPS, causing
|
||||
# mixed-content errors that block audio playback in the browser.
|
||||
- FORWARDED_ALLOW_IPS=*
|
||||
restart: unless-stopped
|
||||
|
||||
nginx:
|
||||
|
||||
Reference in New Issue
Block a user