Open zzacharo opened 4 years ago
Is this somehow connected with this error message?
The resource from “https://127.0.0.1:5000/static/js/pdfjs/pdf.worker.min.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff). loremipsum.pdf
I'm using Invenio-Previewer 1.1.0
and Firefox 73.0.1
@egabancho what I noticed is that the file is required but not placed correctly under /static
. Your issue seems more like a CSP one. In my case the pdf preview is working properly but still I think the fact that the file is not there needs to be addressed by removing it if is not necessary or fixing it :)
Tl;DR:
In this file there is a dependency on
/static/js/pdfjs/pdf.worker.min.js
but the file is not bundled. We should either include it in thestatic
file or create a specific bundle for that. Or align assets/js/pdfjs/viewer.js with static/js/pdfjs/viewer.js.