疯狂的狮子li
2021-09-27 eecefdc4fa2672d3f1c3510baf4adf6476dca7e1
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
@@ -109,11 +109,12 @@
                        "/**/*.js"
                ).permitAll()
                .antMatchers(securityProperties.getAnonymous()).anonymous()
                .antMatchers(securityProperties.getPermitAll()).permitAll()
                // 除上面外的所有请求全部需要鉴权认证
                .anyRequest().authenticated()
                .and()
                .headers().frameOptions().disable();
        httpSecurity.logout().logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler);
        httpSecurity.logout().logoutUrl(securityProperties.getLogoutUrl()).logoutSuccessHandler(logoutSuccessHandler);
        // 添加JWT filter
        httpSecurity.addFilterBefore(authenticationTokenFilter, UsernamePasswordAuthenticationFilter.class);
        // 添加CORS filter