aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick')
-rw-r--r--src/main/java/com/juick/config/SecurityConfig.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/com/juick/config/SecurityConfig.java b/src/main/java/com/juick/config/SecurityConfig.java
index 41992e03..8a41ab5b 100644
--- a/src/main/java/com/juick/config/SecurityConfig.java
+++ b/src/main/java/com/juick/config/SecurityConfig.java
@@ -242,7 +242,6 @@ public class SecurityConfig {
.requestMatchers("/settings", "/pm/**", "/**/bl", "/_twitter", "/post",
"/comment")
.authenticated()
- .requestMatchers("/actuator/**").hasRole("ADMIN")
.anyRequest().permitAll())
.anonymous(anonymous -> anonymous.principal(JuickUser.ANONYMOUS_USER)
.authorities(JuickUser.ANONYMOUS_AUTHORITY))
@@ -267,4 +266,10 @@ public class SecurityConfig {
.headers().defaultsDisabled().cacheControl();
return http.build();
}
+ @Bean
+ public SecurityFilterChain securityWebFilterChain(
+ HttpSecurity http) throws Exception {
+ return http.securityMatcher("/actuator/**")
+ .authorizeHttpRequests(authorize -> authorize.anyRequest().hasRole("ADMIN")).build();
+ }
}