Merge pull request 'Disable service worker fetch cache for media proxy' (#3561) from iamtakingiteasy/pleroma-fe:fix-media-proxy-sw-cache into develop

Reviewed-on: https://git.pleroma.social/pleroma/pleroma-fe/pulls/3561
This commit is contained in:
HJ 2026-08-16 13:13:20 +00:00
commit 042a9f7dcc
2 changed files with 4 additions and 1 deletions

View file

@ -0,0 +1 @@
Prevent service worker from caching media-proxy responses

View file

@ -116,7 +116,9 @@ const isNotMedia = (req) => {
return false return false
} }
const url = new URL(req.url) const url = new URL(req.url)
return !url.pathname.startsWith('/media/') return (
!url.pathname.startsWith('/media/') && !url.pathname.startsWith('/proxy/')
)
} }
const isAsset = (req) => { const isAsset = (req) => {
const url = new URL(req.url) const url = new URL(req.url)