mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-10 19:39:01 +00:00
Make /health and /info insecure by default
Closes gh-13722
This commit is contained in:
+13
-1
@@ -47,8 +47,20 @@ public class SampleSecureWebFluxApplicationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void actuatorsSecureByDefault() {
|
||||
public void healthInsecureByDefault() {
|
||||
this.webClient.get().uri("/actuator/health").accept(MediaType.APPLICATION_JSON)
|
||||
.exchange().expectStatus().isOk();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void infoInsecureByDefault() {
|
||||
this.webClient.get().uri("/actuator/info").accept(MediaType.APPLICATION_JSON)
|
||||
.exchange().expectStatus().isOk();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void otherActuatorsSecureByDefault() {
|
||||
this.webClient.get().uri("/actuator/env").accept(MediaType.APPLICATION_JSON)
|
||||
.exchange().expectStatus().isUnauthorized();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user