From 41ca4e938d63027931447ebe343f47366194cac2 Mon Sep 17 00:00:00 2001 From: panlinlin <648540858@qq.com> Date: 星期一, 19 四月 2021 11:04:11 +0800 Subject: [PATCH] 修复打包后静态页面加载异常 --- src/main/java/com/genersoft/iot/vmp/conf/security/WebSecurityConfig.java | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/conf/security/WebSecurityConfig.java b/src/main/java/com/genersoft/iot/vmp/conf/security/WebSecurityConfig.java index 1de14e6..ebeefd4 100644 --- a/src/main/java/com/genersoft/iot/vmp/conf/security/WebSecurityConfig.java +++ b/src/main/java/com/genersoft/iot/vmp/conf/security/WebSecurityConfig.java @@ -69,9 +69,7 @@ // 鍙互鐩存帴璁块棶鐨勯潤鎬佹暟鎹� web.ignoring() .antMatchers("/") - .antMatchers("/css/**") - .antMatchers("/img/**") - .antMatchers("/fonts/**") + .antMatchers("/static/**") .antMatchers("/index.html") .antMatchers("/doc.html") // "/webjars/**", "/swagger-resources/**", "/v3/api-docs/**" .antMatchers("/webjars/**") @@ -100,6 +98,8 @@ @Override protected void configure(HttpSecurity http) throws Exception { http.cors().and().csrf().disable(); + // 璁剧疆鍏佽娣诲姞闈欐�佹枃浠� + http.headers().contentTypeOptions().disable(); http.authorizeRequests() // 鏀捐鎺ュ彛 .antMatchers("/api/user/login","/index/hook/**").permitAll() -- Gitblit v1.8.0