Enable Spring Boot Actuator with limited exposure and secure /actuator/mappings endpoint access.
This commit is contained in:
@@ -56,6 +56,7 @@ public class SecurityConfig {
|
||||
auth -> auth
|
||||
.requestMatchers(HttpMethod.OPTIONS, "/**").permitAll()
|
||||
.requestMatchers("/api/chat/send/**").access(allowedIpCheck)
|
||||
.requestMatchers("/actuator/mappings").access(allowedIpCheck)
|
||||
.requestMatchers("/api/form/**").authenticated()
|
||||
.requestMatchers("/api/login/getUsername").authenticated()
|
||||
.requestMatchers("/api/mail/**").authenticated()
|
||||
|
||||
@@ -19,3 +19,4 @@ spring.mail.properties.mail.smtp.auth=true
|
||||
spring.mail.properties.mail.smtp.ssl.enable=true
|
||||
spring.mail.properties.mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory
|
||||
chat.allowed-ip=${ALLOWED_IP:10.0.0.0/24}
|
||||
management.endpoints.web.exposure.include=mappings
|
||||
|
||||
Reference in New Issue
Block a user