fix: CORS issue for PDF download

CORS requests would fail after a cached no-CORS request of the same urls
This commit is contained in:
Xmader 2021-01-27 12:57:35 -05:00
parent 29a09c2596
commit 41f5286d48
No known key found for this signature in database
GPG key ID: A20B97FB9EB730E4

View file

@ -25,7 +25,9 @@ const readData = (blob: Blob, type: DataResultType): Promise<string> => {
}
const fetchBlob = async (imgUrl: string): Promise<Blob> => {
const r = await fetch(imgUrl)
const r = await fetch(imgUrl, {
cache: 'no-cache',
})
return r.blob()
}