[Spring boot] Refused to execute script from 'http://localhost:~~~' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.


スプリングの安全構成を設定してテストしようとしたところ、タイトルと同じエラーが発生しました.
Refused to execute script from ' http://localhost:8000/auth/login ' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
開発者ツール->ネットワーク
アクションをクリックすると、jsからControllerに移動する必要があります.
jsはSpring Security Configにjsアクセス権を設定しません.
ログインページのロードを続けてみます.
1.join : 200
2.user.js : 302 error
3.login : 200
何か漏れたのかと思ったら、permitAllにJoin完了後にアクセスしたインデックス(ルートパス)を追加しませんでした.
http
.authorizeHttpRequests()
.antMatchers("/", "/auth/**") // "/" 추가
.permitAll()