Repository navigation
Plugin Subsonic
Derrik Diener edited this page Jul 16, 2026
·
1 revision
Enabled by Default: Yes (Disable via SUPERNOVA_PLUGIN_SUBSONIC=false)
The Subsonic plugin implements the industry-standard REST API created by the original Subsonic project. This effectively turns Supernova into a universal music server, allowing any third-party app (like DSub, playSub, Symfonium, etc.) to connect to it.
-
Middleware Integration: It mounts its own specialized authentication middleware over the
/rest/endpoint group. This middleware supports both legacy password hexing and moderntoken/saltauthentication required by the Subsonic spec. -
Response Translation: The API supports returning data in either
JSONorXMLformat depending on the client'sf=query parameter. Supernova dynamically generates XML using a recursive tree builderwriteXML(). -
Security:
- Uses
context.WithValueutilizing a privatecontextKeytype to pass authenticated users down the request chain safely. - Streaming endpoints (
/rest/stream,/rest/download) employ strict path validation. The plugin verifies that the requestedfile_pathbegins with the server's configuredMEDIA_PATHenvironment variable. If a malicious client passes an arbitrary path, it will be blocked with a 403 Forbidden.
- Uses
- Accessible under
GET /rest/*