Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firefox blocked resource due to Type mismatch

The resource from http://some-address/script.jsx was blocked due to MIME type mismatch (X-Content-Type-Options: nosniff).
This issue I get in console of Firefox (Chrome seems doesn't care about it). Here's a screenshot of console:
enter image description here
I searched for a while trying to find how tot fix it, but failed. Here's the HTML part of the code. enter image description here

As far as I've understood the problem is due to type="text/babel". But if I would change it to type="text/javascript" then Babel doesn't transpile the script to ES5.

like image 975
Taras Yaremkiv Avatar asked Dec 10 '16 13:12

Taras Yaremkiv


1 Answers

this is because your server send response header X-Content-Type-Options: "nosniff", remove it or change mime type for jsx to text/babel with .htaccess it can done by adding AddType text/babel jsx

like image 63
ewwink Avatar answered Sep 17 '22 18:09

ewwink