From f6bc28000e08839e30112f012e13f66f25d5e7c2 Mon Sep 17 00:00:00 2001 From: RuoYi <yzz_ivy@163.com> Date: 星期四, 29 七月 2021 17:32:55 +0800 Subject: [PATCH] 防止错误token导致的解析异常 --- ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java index 1053159..30718c3 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java @@ -88,7 +88,7 @@ protected void configure(HttpSecurity httpSecurity) throws Exception { httpSecurity - // CRSF禁用,因为不使用session + // CSRF禁用,因为不使用session .csrf().disable() // 认证失败处理类 .exceptionHandling().authenticationEntryPoint(unauthorizedHandler).and() @@ -100,12 +100,13 @@ .antMatchers("/login", "/captchaImage").anonymous() .antMatchers( HttpMethod.GET, + "/", "/*.html", "/**/*.html", "/**/*.css", - "/**/*.js" + "/**/*.js", + "/profile/**" ).permitAll() - .antMatchers("/profile/**").anonymous() .antMatchers("/common/download**").anonymous() .antMatchers("/common/download/resource**").anonymous() .antMatchers("/swagger-ui.html").anonymous() -- Gitblit v1.9.2