diff --git a/backend/build.gradle.kts b/backend/build.gradle.kts index fc44155..7ccbb4c 100644 --- a/backend/build.gradle.kts +++ b/backend/build.gradle.kts @@ -43,6 +43,7 @@ dependencies { //Open API implementation("io.swagger.core.v3:swagger-annotations:2.2.37") implementation("io.swagger.core.v3:swagger-models:2.2.37") + implementation("org.springframework.boot:spring-boot-starter-actuator") //AOP implementation("org.aspectj:aspectjrt:1.9.19") diff --git a/backend/src/main/java/com/alttd/altitudeweb/config/SecurityConfig.java b/backend/src/main/java/com/alttd/altitudeweb/config/SecurityConfig.java index c2f8e54..bf7ac44 100644 --- a/backend/src/main/java/com/alttd/altitudeweb/config/SecurityConfig.java +++ b/backend/src/main/java/com/alttd/altitudeweb/config/SecurityConfig.java @@ -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() diff --git a/backend/src/main/resources/application.properties b/backend/src/main/resources/application.properties index 216e26c..353d5bd 100644 --- a/backend/src/main/resources/application.properties +++ b/backend/src/main/resources/application.properties @@ -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