TwisterMc / pdfjs-viewer-shortcode

A Wordpress plugin for embedding PDFs using Mozilla's Excellent PDF.js
https://wordpress.org/plugins/pdfjs-viewer-shortcode/
Apache License 2.0
7 stars 5 forks source link

"viewer.mjs” was blocked because of a disallowed MIME type. #35

Open datgausaigon opened 3 days ago

datgausaigon commented 3 days ago

Hi,

In your latest version (v2.2) the PDF cannot be loaded onto the page and when I open the Browser Console I receive the following error message:

/wp-content/plugins/pdfjs-viewer-shortcode/pdfjs/web/viewer.mjs” was blocked because of a disallowed MIME type (“application/octet-stream”)

In NGINX or Open Lite Speed Web Server I need add .mjs to mime config.

/usr/local/lsws/conf/mime.properties js, mjs = text/javascript

This is not the correct way. That file "viewer.mjs" must be .js and the Server should not add such mimes.

Thanks ❤️