-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Description
Link to PDF file (or attach file here): https://github.com/mozilla/pdf.js/blob/gh-pages/web/viewer.js#L8366
Configuration:
- Web browser and its version: firefox
- Operating system and its version: ubuntu
- PDF.js version: PDF.js version 1.5.292 (latest commit of gh-pages as of today- bc5e00a)
- Is an extension: no
Steps to reproduce the problem:
- Set up a page for the viewer.
- Set up a server to serve pdfs with the access-control-allow-origin configured correctly
- Go to the viewer with the file argument set to one of the pdfs from step 2 (as in "example.com/web/viewer.html?file=http://website.org/pdf.pdf")
What is the expected behavior? (add screenshot)
For the viewer to show the pdf normally.
What went wrong? (add screenshot)
Exception thrown by the viewer: "file origin does not match viewer's"
NOTICE: When I removed the throw exception from line 8366 (if (fileOrigin !== viewerOrigin) then throw the exception), the viewer worked JUST FINE with my project. So this check should be substituted for one that doesn't prevent something that should work from working, or removed (IMO).
Metadata
Metadata
Assignees
Labels
No labels