its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
来源:互联网 发布:软件开发公司账务处理 编辑:程序博客网 时间:2024/05/19 01:12
今天遇到的问题,使用SpringBoot 的时候,加上 SpringSecurity 之后,页面的请求总是会报错its MIME type ('text/html') is not executable, and strict MIME type checking is enabled
Refused to execute script from 'http://127.0.0.1:8088/knight/web/bower_components/jquery/dist/jquery.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
login#action/login:1 Refused to execute script from 'http://127.0.0.1:8088/knight/web/bower_components/bootstrap/dist/js/bootstrap.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
login#action/login:1 Refused to execute script from 'http://127.0.0.1:8088/knight/web/bower_components/bootstrap-hover-dropdown/bootstrap-hover-dropdown.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
login#action/login:1 Refused to execute script from 'http://127.0.0.1:8088/knight/web/bower_components/angular/angular.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
login#action/login:1 Refused to execute script from 'http://127.0.0.1:8088/knight/web/bower_components/angular-messages/angular-messages.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
login#action/login:1 Refused to execute script from 'http://127.0.0.1:8088/knight/web/bower_components/angular-ui-router/release/angular-ui-router.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
login#action/login:1 Refused to execute script from 'http://127.0.0.1:8088/knight/web/bower_components/angular-bootstrap/ui-bootstrap.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
login#action/login:1 Refused to execute script from 'http://127.0.0.1:8088/knight/web/bower_components/angular-local-storage/dist/angular-local-storage.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
login#action/login:1 Refused to execute script from 'http://127.0.0.1:8088/knight/web/bower_components/angular-animate/angular-animate.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
login#action/login:1 Refused to execute script from 'http://127.0.0.1:8088/knight/web/bower_components/bootstrap-timepicker/js/bootstrap-timepicker.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
login#action/login:1 Refused to execute script from 'http://127.0.0.1:8088/knight/web/bower_components/angular-translate/angular-translate.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
login#action/login:1 Refused to execute script from 'http://127.0.0.1:8088/knight/web/bower_components/angular-translate-storage-cookie/angular-translate-storage-cookie.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
login#action/login:1 Refused to execute script from 'http://127.0.0.1:8088/knight/web/static/style/bootstrap-modal/js/bootstrap-modal.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
login#action/login:1 Refused to execute script from 'http://127.0.0.1:8088/knight/web/static/style/bootstrap-modal/js/bootstrap-modalmanager.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
login#action/login:1 Refused to execute script from 'http://127.0.0.1:8088/knight/web/static/style/bootstrap-hover-dropdown/bootstrap-hover-dropdown.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
login#action/login:1 Refused to execute script from 'http://127.0.0.1:8088/knight/web/bower_components/artDialog/dist/dialog.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
login#action/login:1 Refused to execute script from 'http://127.0.0.1:8088/knight/web/static/scripts/myUtils.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
login#action/login:1 Refused to execute script from 'http://127.0.0.1:8088/knight/web/static/scripts/basePath.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
login#action/login:1 Refused to execute script from 'http://127.0.0.1:8088/knight/web/login/js/loginController.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
但是加上之后呢又不存在这个题,多方查阅,最后,是SpringSecurity拦截掉了,检查自己的代码,最后发现是配置的路径不对
@Overridepublic void configure(WebSecurity webSecurity) throws Exception{ webSecurity .ignoring() .antMatchers("web/**");//放开所有静态资源}
改成:
@Overridepublic void configure(WebSecurity webSecurity) throws Exception{ webSecurity .ignoring() .antMatchers("/web/**");//放开所有静态资源}
重启,就可以了.
- 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)
- Refused to execute script from '....js' because its MIME type ('text/html') is not executable...
- Refused to execute script from '*' because its MIME type ('text/plain') is not executable
- chrome出现MIME type is not executable
- What is MIME type?
- 生产环境浏览器Strict MIME TYPE Checking问题解决
- nginx gzip duplicate MIME type “text/html”
- HTML MIME Type
- MIME TYPE
- Mime-Type
- Mime-Type
- MIME Type
- mime type
- MIME Type
- Mime-type
- Mime-Type
- mime-type
- Intellij IDEA 14中使用MyBatis-generator 自动生成MyBatis代码
- Java调用R语言
- angularjs实现省市二级菜单(可以选择默认值)
- 选择合适的电阻型分压器
- 线程与cpu进行绑定——006非常全面
- its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
- Required String parameter is not present 或 Unsupported Media Type
- 客户端简单位置同步
- [常见Bug]Kotlin,编译报错“Unresolved reference: ......”的解决方法
- Kruskal算法求最小生成树的c++代码实现
- redis服务搭建及简单使用
- 从相册中选择照片
- oracel存储过程
- 翻译连载 | 第 10 章:异步的函数式(上)-《JavaScript轻量级函数式编程》 |《你不知道的JS》姊妹篇