feat: add favicon.ico and gate model write APIs by env flag

- Generate and serve real /favicon.ico from static assets
- Update HTML to use /favicon.ico
- Add ENABLE_MODEL_RW_API setting (default: false)
- Disable POST/DELETE model endpoints by default
- Hide write endpoints from OpenAPI when disabled
- Return 404 for write endpoints when disabled
- Update env.example with ENABLE_MODEL_RW_API documentation
- Update README and PRD with R/W API policy and remote compose notes
- Add tests to verify write endpoints are disabled by default
This commit is contained in:
Luca Sacchi Ricciardi
2026-04-24 19:35:24 +02:00
parent 893376dc14
commit 32b1130632
9 changed files with 69 additions and 9 deletions
+6
View File
@@ -61,6 +61,12 @@ async def dashboard():
"""Dashboard principale"""
return FileResponse(templates_path / "index.html")
@app.get("/favicon.ico", include_in_schema=False)
async def favicon():
"""Favicon dell'applicazione."""
return FileResponse(static_path / "favicon.ico")
# Event hooks
@app.on_event("startup")
async def startup_event():