forked from Furumi/furumi-web
Pass generic proxy responses through only when they start like audio
The enclosure type of a feed or of a client-sent episode reference no longer makes an application/octet-stream response acceptable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
cfebe1898f
commit
fc0befc4a3
4 files changed
+278
-81
No files matched your search
+15
-8
@@ -148,14 +148,21 @@ and passes it through without storing it. This uses the server's bandwidth.
|
||||
Security model of the proxy:
|
||||
|
||||
- It takes an episode id, never a URL. The URL comes from the signed-in
|
||||
account's own podcast catalog: its feeds, and episode references that its
|
||||
own trusted devices sent (for example the current item of a handoff). Any
|
||||
signed-in user can therefore make the server fetch audio URLs of feeds they
|
||||
subscribe to, as with feed refreshes.
|
||||
- The same public-address checks as for feeds apply to every connection and
|
||||
redirect; only audio content types are passed through (no HTML, no video),
|
||||
with a single byte range, up to 1 GiB and 4 hours per request, and no
|
||||
cookies or credentials are sent.
|
||||
account's own podcast catalog: its feeds, and episode references sent by
|
||||
the account's own clients (its paired devices, or its browser when it plays
|
||||
a handed-off episode the catalog does not know yet). A signed-in user
|
||||
controls both (anyone can subscribe to a feed they host), so any signed-in
|
||||
user can make the server fetch audio from any public URL, as with feed
|
||||
refreshes.
|
||||
- What limits that: the same public-address and port checks as for feeds
|
||||
apply to every connection and redirect, and only audio is passed through.
|
||||
The publisher's `Content-Type` must be audio; for a generic binary type
|
||||
(`application/octet-stream` or none), the URL must have an audio file
|
||||
extension or the file must start like an audio file (MP3, AAC, Ogg, FLAC,
|
||||
WAV, M4A). The enclosure type written in the feed is never trusted. No
|
||||
HTML, no video. Requests carry a single byte range, are limited to 1 GiB
|
||||
and 4 hours each and to four streams per account (64 for the server), and
|
||||
no cookies or credentials are sent.
|
||||
- Responses are not cached or stored, and are marked `no-store`, `nosniff`
|
||||
and sandboxed.
|
||||
|
||||
|
||||
Reference in new issue
Block a user