fix: ingestion et service worker sont maintenant redémarré toutes les 6h
This commit is contained in:
@@ -25,7 +25,11 @@ self.addEventListener('push', (event) => {
|
||||
self.addEventListener('notificationclick', (event) => {
|
||||
event.notification.close();
|
||||
|
||||
const targetUrl = event.notification.data?.url ?? '/';
|
||||
const rawUrl = event.notification.data?.url ?? '/';
|
||||
// N'autoriser que les URLs relatives ou du même domaine (protection open redirect)
|
||||
const targetUrl = (rawUrl.startsWith('/') || rawUrl.startsWith(self.location.origin))
|
||||
? rawUrl
|
||||
: '/';
|
||||
|
||||
event.waitUntil(
|
||||
clients.matchAll({ type: 'window', includeUncontrolled: true }).then((windowClients) => {
|
||||
|
||||
Reference in New Issue
Block a user