Fix mixed content error for audio files behind HTTPS proxy

Add root_path setting to configure Gradio for HTTPS reverse proxy.
Set AUDIOCRAFT_ROOT_PATH env var to external URL (e.g., https://example.com).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-27 15:35:07 +01:00
parent 2f9bdb122f
commit f3b5894e0e
2 changed files with 12 additions and 6 deletions

View File

@@ -26,6 +26,7 @@ class Settings(BaseSettings):
host: str = Field(default="0.0.0.0", description="Server bind host")
gradio_port: int = Field(default=7860, description="Gradio UI port")
api_port: int = Field(default=8000, description="FastAPI port")
root_path: Optional[str] = Field(default=None, description="External URL for reverse proxy (e.g., https://example.com)")
# Paths
data_dir: Path = Field(default=Path("./data"), description="Data directory")