Refused to execute script from '​​http://127.0.0.1:8004/login'​​ because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

Refused to execute script …”,为什么会被拒绝执行呢?想到可能是权限的控制问题,亦即是 Spring Security 的静态资源访问配置问题。经核查,的确是这样的问题。

添加静态资源不拦截:





Refused to execute script from


image.png