Refused to execute script from '*' because its MIME type ('text/plain') is not executable
来源:互联网 发布:如何使用java框架 编辑:程序博客网 时间:2024/05/24 22:45
软件环境:window10
编译环境:python2.7.9,pycharm4.5.3 ,nodejs6.9
问题描述:当开发环境搭建成功,启动odoo9或者odoo10后(已创建数据库),登陆访问报错如下
web:1 Refused to execute script from '*/web.assets_common.js' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled
问题截图如下:
分析:服务端在Response中设置了X-Content-Type-Options:nosniff ,告诉浏览器强制检查资源的MIME,进行加载,
但是,web.assets_common.js原本就是js文件,浏览器把该文件当作“纯文本”(file.content_type:text/plain)解析。
故用任何浏览器都会报错。
原因:可能是pycharm或者nodejs 合并压缩JS过程中,把文件类型改成了text/plain;这个过程我还不知道什么原因,后续了解了,再补充。
解决方案:
查询数据库找到后台返回的文件类型text/plain
select * from ir_attachment where mimetype ='text/plain' and datas_fname like '%.js';
把mimetype字段的值:text/plain 改为 text/javascript
0 0
- Refused to execute script from '*' because its MIME type ('text/plain') is not executable
- Refused to execute script from '....js' because its MIME type ('text/html') is not executable...
- its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
- its MIME type ('text/html') is not executable, and strict MIME type checking is enabled(非404)
- chrome出现MIME type is not executable
- Chrome 报 Resource interpreted as Script but transferred with MIME type text/plain 警告的解决办法
- 关于 Resource interpreted as Script but transferred with MIME type text/plain问题的处理
- Chrome 报 Resource interpreted as Script but transferred with MIME type text/plain 警告的解决办法
- Cordova页面解析页面中script标签内容失败,Refused to execute inline script because it violates the following
- Cordova页面解析页面中script 内容失败,Refused to execute inline script because it violates the following
- cannot be opened because its project type (.sqlproj) is not supported by this version...
- [MIME] Content-Type 、IE、MIME和 注册表的那些事 (text/plain 文件 下载)
- Content type 'text/plain;charset=UTF-8' not supported
- iOS开发点滴-“to prevent warning from “PerformSelect may cause a leak because its selector is unknown””
- 'AddressOf' expression cannot be converted to 'Long' because 'Long' is not a delegate type.解决办法
- Resource interpreted as Image but transferred with MIME type text/plain 警告解决方案
- 发邮件抛异常。no object DCH for MIME type text/plain; charset=UTF-8
- Resource interpreted as Stylesheet but transferred with MIME type text/plain
- php闭包
- getLocationInWindow和getLocationOnScreen的区别
- PHP5及DiscuzX安装指南
- mysql 千万级数据的删除
- 并发编程实例---批量插入数据
- Refused to execute script from '*' because its MIME type ('text/plain') is not executable
- C++文件读取学习
- android防止按钮多次点击和添加双击事件
- Linux Core Dump浅析
- centos6.8配置jdk7环境及tomcat服务器
- 百度账号选取方案
- 某度实习的前端小白进化史--Homebrewde
- DB2错误信息SQLCODE SQLSTATE (按sqlcode排序)
- maven本地库安装