stephanrauh / ngx-extended-pdf-viewer

A full-blown PDF viewer for Angular 16, 17, and beyond
https://pdfviewer.net
Apache License 2.0
450 stars 167 forks source link

We are hosting our project also at Azure and had the situation where the .mjs files didn't load and the following error message was shown in the browsers devConsole: #2297

Closed venkycoder422 closed 2 months ago

venkycoder422 commented 2 months ago

We are hosting our project also at Azure and had the situation where the .mjs files didn't load and the following error message was shown in the browsers devConsole: image

We solved the problem by overwriting the Content-Type with the correct "text/javascript". You can do this in the Azure Portal -> CDN -> Settings -> Rules Engine by adding the following rule:

image

Maybe this is of help for someone encountering similiar issues FYI @papes1ns @JJRimorin @stephanrauh

Originally posted by @capraibex in https://github.com/stephanrauh/ngx-extended-pdf-viewer/issues/2196#issuecomment-2005853323

venkycoder422 commented 2 months ago

@capraibex is it cost any amount if we allow the above?

stephanrauh commented 2 months ago

I'd be very surprised if configuring the server results in additional costs. Nonetheless, I'll try to get rid of the *.mjs files in version 20. At the moment, I can't promise anything - I don't know whether it works.

stephanrauh commented 2 months ago

Unfortunately, the .mjs file format is necessary, so I can't return to simple .js files.