JavaScript files blocked because of MIME type mismatch
Posted: Wed Jul 03, 2024 5:11 pm
Hi,
One of our customers delivers the Oxygen WebHelp output via a WordPress site. However, all the JavaScript from the WebHelp is blocked by the browser with the following error message:
The resource from “https://docs.mydomain.de/pub/setclip/ah ... 2024041900” was blocked due to MIME type (“text/plain”) mismatch (X-Content-Type-Options: nosniff).
According to Resource blocked due to MIME type mismatch (X-Content-Type-Options: nosniff) this is because the server sets the content type of the JavaScript files to text/plain instead of text/javascript. Is this something that can be fixed on WebHelp level? Or is this a server configuration?
Best regards,
Frank
EDIT
Looks as if the script tags that include the JavaScript files are missing the type-attribute compared to the CSS files:
One of our customers delivers the Oxygen WebHelp output via a WordPress site. However, all the JavaScript from the WebHelp is blocked by the browser with the following error message:
The resource from “https://docs.mydomain.de/pub/setclip/ah ... 2024041900” was blocked due to MIME type (“text/plain”) mismatch (X-Content-Type-Options: nosniff).
According to Resource blocked due to MIME type mismatch (X-Content-Type-Options: nosniff) this is because the server sets the content type of the JavaScript files to text/plain instead of text/javascript. Is this something that can be fixed on WebHelp level? Or is this a server configuration?
Best regards,
Frank
EDIT
Looks as if the script tags that include the JavaScript files are missing the type-attribute compared to the CSS files:
Code: Select all
<script src="./oxygen-webhelp/app/options/properties.js"></script>
<link rel="stylesheet" type="text/css" href="./oxygen-webhelp/app/main.css" />