From 41f5286d480643d7ca9369ad667ecdebc74adc9a Mon Sep 17 00:00:00 2001 From: Xmader Date: Wed, 27 Jan 2021 12:57:35 -0500 Subject: [PATCH] fix: CORS issue for PDF download CORS requests would fail after a cached no-CORS request of the same urls --- src/worker.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/worker.ts b/src/worker.ts index 1bc0dd9..adea0d3 100644 --- a/src/worker.ts +++ b/src/worker.ts @@ -25,7 +25,9 @@ const readData = (blob: Blob, type: DataResultType): Promise => { } const fetchBlob = async (imgUrl: string): Promise => { - const r = await fetch(imgUrl) + const r = await fetch(imgUrl, { + cache: 'no-cache', + }) return r.blob() }