@file-viewer/renderer-pdf 2.3.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pdf.js +5 -1
- package/package.json +1 -1
package/dist/pdf.js
CHANGED
|
@@ -751,7 +751,11 @@ export default async function renderPdf(buffer, target, context) {
|
|
|
751
751
|
try {
|
|
752
752
|
const response = await fetcher(workerUrl, {
|
|
753
753
|
method: 'GET',
|
|
754
|
-
cache
|
|
754
|
+
// A successful range probe must never seed the HTTP cache for the
|
|
755
|
+
// subsequent module Worker request. Some static servers correctly
|
|
756
|
+
// return 206 here, and Chromium can otherwise reuse that partial body
|
|
757
|
+
// as the Worker module, which fails with "Invalid or unexpected token".
|
|
758
|
+
cache: 'no-store',
|
|
755
759
|
headers: {
|
|
756
760
|
Range: `bytes=0-${PDF_WORKER_VERSION_PROBE_BYTES - 1}`,
|
|
757
761
|
},
|