Fixed private pages being cached
All checks were successful
Build Docker image / build (push) Successful in 1m22s
Build Docker image / deploy (push) Successful in 4s
Build Docker image / verify (push) Successful in 1m8s

This commit is contained in:
Roman Krček
2025-09-02 18:43:15 +02:00
parent cdc8b89916
commit e52aea9dd3

View File

@@ -64,7 +64,8 @@ self.addEventListener('fetch', (event) => {
throw new Error('invalid response from fetch');
}
if (response.status === 200) {
// Do not cache private pages
if (response.status === 200 && !url.pathname.startsWith('/private')) {
cache.put(event.request, response.clone());
}