music: document the full /api/music/* contract at the source of truth
The proxy is an opaque catch-all, so the endpoint surface wasn't perceivable from the platform side. Add a contract header (all routes + params + SSE/response shapes) atop the sidecar fetch handler where the routes are defined, and point the proxy router at it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -3,8 +3,12 @@ import { getMusicServerUrl } from './sidecar-server';
|
||||
|
||||
// Thin reverse-proxy for /api/music/*. Auth is handled upstream by userMiddleware (this router mounts
|
||||
// under the protected /api tree, so the media `?token=` path works). Everything else — path resolution,
|
||||
// byte-range streaming, ffprobe duration — is done by the officer-music sidecar's audio server. We only
|
||||
// forward the subpath + query + Range and stream the response back.
|
||||
// byte-range streaming, ffprobe duration, indexing — is done by the officer-music sidecar's audio
|
||||
// server. We only forward the subpath + query + Range and stream the response back.
|
||||
//
|
||||
// This is a catch-all, so it lists no routes: the full /api/music/* HTTP contract (stream, manifest,
|
||||
// meta, cover, reindex, reindex/stream + their SSE/response shapes) is documented at the top of the
|
||||
// sidecar's fetch handler — src/servers/sidecar/music/index.ts.
|
||||
|
||||
export const musicRouter = createRouter();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user