Repository navigation
Cache proxied embed tracks until the archive changes - #873
Merged
Merged
Conversation
… of downloading them again /__url-load-proxy answered no-store and dropped the upstream's validators, so every embed ?track= (and player ?music=) load from another origin downloaded the whole archive. Move the proxy into url-load-proxy.ts, answer no-cache, and pass ETag / Last-Modified and If-None-Match / If-Modified-Since through, so an unchanged archive comes back as a 304.
This was referenced Oct 31, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
?track=(and the player's?music=) archive from another origin was downloaded in full on every load:/__url-load-proxyansweredcache-control: no-storeand dropped the host's validators.packages/worker-play/src/url-load-proxy.ts) now answersno-cache, passes the upstream'sETag/Last-Modifiedback, and forwards the browser'sIf-None-Match/If-Modified-Since. The browser keeps the archive and revalidates it on each load; an unchanged archive comes back as a bodiless 304. A host that sends no validator is still downloaded every time.@be-music/worker-playchangeset.Tests
pnpm run checkvp test run packages/worker-play(newurl-load-proxy.test.ts: validators pass through, 304 on an unchanged archive, 200 on a changed one, no other headers forwarded, method / target refusals)🤖 Generated with Claude Code