@file-viewer/renderer-pdf 2.3.0 → 2.3.1-rc.0

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.
Files changed (2) hide show
  1. package/dist/pdf.js +5 -1
  2. 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: 'no-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
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@file-viewer/renderer-pdf",
3
- "version": "2.3.0",
3
+ "version": "2.3.1-rc.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Standalone PDF renderer plugin for File Viewer powered by PDF.js.",