root 2 years ago
parent
commit
77aed90f35
1 changed files with 4 additions and 4 deletions
  1. 4 4
      pdf.js/web/viewer.js

+ 4 - 4
pdf.js/web/viewer.js

@@ -2789,10 +2789,10 @@ exports.PDFViewerApplication = PDFViewerApplication;
       if (HOSTED_VIEWER_ORIGINS.includes(viewerOrigin)) {
         return;
       }
-      const fileOrigin = new URL(file, window.location.href).origin;
-      if (fileOrigin !== viewerOrigin) {
-        throw new Error("file origin does not match viewer's");
-      }
+      // const fileOrigin = new URL(file, window.location.href).origin;
+      // if (fileOrigin !== viewerOrigin) {
+      //   throw new Error("file origin does not match viewer's");
+      // }
     } catch (ex) {
       PDFViewerApplication.l10n.get("loading_error").then(msg => {
         PDFViewerApplication._documentError(msg, {