I have a portal app that uses web files to serve an Angular 13 app.
When I build the app locally to test it I can see it serves the build files as Content-Type=application/javascript; charset=UTF-8 and the app renders the correct values to the page. (2nd screenshot)
However, when I upload the same build files as Web Files in Dynamics CRM I can see that they are being served as Content-Type=text/javascript and the Javascript is not evaluated. (1st screenshot)
1) Could someone kindly tell me what could be stopping Dynamics CRM from interpreting the Web Files as Content-Type=application/JavaScript; charset=UTF-8?
2) Is there a site setting in Dynamics that could be blocking this particular Content-Type?
I can overcome this by using the recommended ahead-of-time compilation setting in the Angular build steps, but this issue has seemingly come out of nowhere and it would be cool to know if this is a configuration option in Dynamics.
Below is when the app is running in the Dynamics portal. Served as Content-Type=text/javascript and not interpolating template values.
Below is the same identical file running in my local environment. Being served as Content-Type=application/javascript; charset=UTF-8 and working as expected.
Thanks!