mirror of
https://github.com/nesquena/hermes-webui.git
synced 2026-05-23 19:00:14 +00:00
8566462b72
The /api/media endpoint only serves files from ~/.hermes, /tmp, and the active workspace. Power users with media in custom directories (models, Downloads, Pictures, ComfyUI outputs) have no way to serve those files inline without copying or symlinking. Add MEDIA_ALLOWED_ROOTS env var — a colon-separated list of absolute paths — that extends the allowed roots at runtime. Each entry is resolved and validated as an existing directory before being appended. Non-existent or invalid paths are silently skipped. This is purely additive: the built-in security whitelist is unchanged, and if MEDIA_ALLOWED_ROOTS is unset, behavior is identical to before.