forked from Furumi/furumi-web
Proxy podcast audio from publishers on request
Browsers stream episode audio from the publisher by default. For
publishers they cannot play directly (CORS, mixed content), the
administrator can enable podcast_audio_proxy_enabled (admin Settings,
FURU_PODCAST_AUDIO_PROXY_ENABLED). The endpoints live in a new app at
/api/podcasts:
- GET /episodes/{episode_id}/audio streams an episode of the signed-in
account. The URL comes from the account's catalog, never from the
request. Requests go through SafeHttp with one sanitized byte Range and
no client headers; 200/206/416 pass through, only audio content types
are served, with nosniff and a sandbox CSP, and responses stop at 1 GiB
or 4 hours.
- GET /episodes/{episode_id}/source returns the publisher URL and, when
enabled, the proxy URL.
- POST /{podcast_id}/refresh refreshes one subscribed feed now.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
bf9a6abc3f
commit
2c0c3d21aa
12 files changed
+1164
-5
No files matched your search
@@ -477,6 +477,10 @@ impl Project for FuruProject {
|
||||
" API:\n",
|
||||
" FURU_SWAGGER_ENABLED Enable Swagger UI at /swagger/ (default: false)\n",
|
||||
"\n",
|
||||
" Podcasts:\n",
|
||||
" FURU_PODCAST_AUDIO_PROXY_ENABLED Stream episode audio through this\n",
|
||||
" server (default: false)\n",
|
||||
"\n",
|
||||
"QUICK START\n",
|
||||
" export FURU_DATABASE_URL=postgres://user:pass@localhost/furumusic\n",
|
||||
" furumusic run",
|
||||
@@ -581,6 +585,10 @@ impl Project for FuruProject {
|
||||
"/admin",
|
||||
);
|
||||
apps.register_with_views(api::ApiApp, "/api");
|
||||
apps.register_with_views(
|
||||
podcasts::http::PodcastsApp::new(Arc::clone(&self.app_config)),
|
||||
"/api/podcasts",
|
||||
);
|
||||
apps.register_with_views(
|
||||
player::PlayerApp::new(
|
||||
Arc::clone(&self.app_config),
|
||||
|
||||
Reference in new issue
Block a user