| | |
| | | |
| | | import de.codecentric.boot.admin.server.config.AdminServerProperties; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.security.config.annotation.web.builders.HttpSecurity; |
| | | import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; |
| | | import org.springframework.security.web.SecurityFilterChain; |
| | |
| | | * @author Lion Li |
| | | */ |
| | | @EnableWebSecurity |
| | | @Configuration |
| | | public class SecurityConfig { |
| | | |
| | | private final String adminContextPath; |
| | |
| | | |
| | | return httpSecurity |
| | | .headers().frameOptions().disable() |
| | | .and().authorizeRequests() |
| | | .antMatchers(adminContextPath + "/assets/**" |
| | | .and().authorizeHttpRequests() |
| | | .requestMatchers(adminContextPath + "/assets/**" |
| | | , adminContextPath + "/login" |
| | | , "/actuator" |
| | | , "/actuator/**" |