diff --git a/backend/src/main/java/io/metersphere/config/ShiroConfig.java b/backend/src/main/java/io/metersphere/config/ShiroConfig.java index 87e63496fa..4a3b00c4a9 100644 --- a/backend/src/main/java/io/metersphere/config/ShiroConfig.java +++ b/backend/src/main/java/io/metersphere/config/ShiroConfig.java @@ -2,7 +2,6 @@ package io.metersphere.config; import io.metersphere.commons.utils.ShiroUtils; import io.metersphere.security.ApiKeyFilter; -import io.metersphere.security.LoginFilter; import io.metersphere.security.ShiroDBRealm; import org.apache.shiro.cache.MemoryConstrainedCacheManager; import org.apache.shiro.session.mgt.SessionManager; @@ -36,7 +35,7 @@ public class ShiroConfig implements EnvironmentAware { @Bean public ShiroFilterFactoryBean getShiroFilterFactoryBean(DefaultWebSecurityManager sessionManager) { ShiroFilterFactoryBean shiroFilterFactoryBean = new ShiroFilterFactoryBean(); - shiroFilterFactoryBean.getFilters().put("authc", new LoginFilter()); +// shiroFilterFactoryBean.getFilters().put("authc", new LoginFilter()); shiroFilterFactoryBean.setLoginUrl("/login"); shiroFilterFactoryBean.setSecurityManager(sessionManager); shiroFilterFactoryBean.setUnauthorizedUrl("/403"); @@ -45,7 +44,8 @@ public class ShiroConfig implements EnvironmentAware { shiroFilterFactoryBean.getFilters().put("apikey", new ApiKeyFilter()); Map filterChainDefinitionMap = shiroFilterFactoryBean.getFilterChainDefinitionMap(); ShiroUtils.loadBaseFilterChain(filterChainDefinitionMap); - filterChainDefinitionMap.put("/**", "apikey, authc"); +// filterChainDefinitionMap.put("/**", "apikey, authc"); + filterChainDefinitionMap.put("/**", "apikey"); return shiroFilterFactoryBean; }