Spring Boot

Refused to execute script from 'http://localhost:8080/piyo/poyo/mokyu.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

投稿日:

Spring Boot 2.0.0.BUILD-SNAPSHOT

Refused to execute script from 'http://localhost:8080/piyo/poyo/mokyu.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

例えば、

...

@EnableWebSecurity
@Configuration
@EnableGlobalMethodSecurity(prePostEnabled = true)
public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter {

...

  @Override
  public void configure(WebSecurity web){
    web.ignoring().antMatchers(
            "/resources/**",
            "/images/**",
            "/piyo/**"
    );
  }

...

-Spring Boot

Copyright© hirooka.pro , 2013-2018 All Rights Reserved.