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:
commit
042a9f7dcc
2 changed files with 4 additions and 1 deletions
1
changelog.d/media-proxy-sw-cache.fix
Normal file
1
changelog.d/media-proxy-sw-cache.fix
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Prevent service worker from caching media-proxy responses
|
||||||
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue