From c684e2e31cd6d3e51cca4359079059ee0c4e9027 Mon Sep 17 00:00:00 2001 From: Jeff Date: Mon, 14 Oct 2024 15:30:39 -0400 Subject: [PATCH] Add json content type --- app/worker.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/worker.ts b/app/worker.ts index 678329d..22da966 100644 --- a/app/worker.ts +++ b/app/worker.ts @@ -182,6 +182,9 @@ export default function start(self: ServiceWorkerGlobalScope) { { method: "POST", body: JSON.stringify(subscription), + headers: { + "Content-Type": "application/json", + }, } ) @@ -203,6 +206,9 @@ export default function start(self: ServiceWorkerGlobalScope) { return fetch(`${process.env.BASE_URL}/api/subscription/${id}`, { method: "PUT", body: JSON.stringify(subscription), + headers: { + "Content-Type": "application/json", + }, }) } }