From bb97c621e61210c976fbce5e7bcfd077988b774a Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Fri, 1 Dec 2017 15:42:13 +0100 Subject: [PATCH] Possible fix for pushsubscriptionchange --- sw/service-worker.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sw/service-worker.ts b/sw/service-worker.ts index df4c5adf..18d12ce4 100644 --- a/sw/service-worker.ts +++ b/sw/service-worker.ts @@ -292,7 +292,9 @@ class MyServiceWorker { } } - let user = await fetch("/api/me").then(response => response.json()) + let user = await fetch("/api/me", { + credentials: "same-origin" + }).then(response => response.json()) return fetch("/api/pushsubscriptions/" + user.id + "/add", { method: "POST",