admin 管理员组文章数量: 1086019
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:
I searched for a while trying to find how tot fix it, but failed. Here's the HTML part of the code.
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.
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:
I searched for a while trying to find how tot fix it, but failed. Here's the HTML part of the code.
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.
Share Improve this question edited Oct 7, 2017 at 20:13 Taras Yaremkiv asked Dec 10, 2016 at 13:47 Taras YaremkivTaras Yaremkiv 3,6008 gold badges33 silver badges56 bronze badges1 Answer
Reset to default 3this 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
本文标签: javascriptFirefox blocked resource due to Type mismatchStack Overflow
版权声明:本文标题:javascript - Firefox blocked resource due to Type mismatch - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://roclinux.cn/p/1744064881a2527403.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论