its MIME type ('text/html') is not executable, and strict MIME type checking is enabled(非404)

新项目导入资源时产生下面报错:

来自“http://127.0.0.1:8089/login/login”的资源已被阻止,因为 MIME 类型不匹配(X-Content-Type-Options: nosniff)
Refused to execute script from 'http://127.0.0.1:8089/js/bootstrap.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

错误出生的方式无数,总有一种你始料未及!

网上查遍无数资料,最终发现是资源被spring security拦截了(不报404的哦)

务必检查bootstrap.js加载文件是否被服务器端拦截,拦截,拦截

你可能感兴趣的:(#,JavaScript,#,Springboot)