diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/LogFileMvcEndpoint.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/LogFileMvcEndpoint.java index f41b6bebbfd..b25a55f5521 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/LogFileMvcEndpoint.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/LogFileMvcEndpoint.java @@ -106,6 +106,7 @@ public class LogFileMvcEndpoint extends AbstractMvcEndpoint { Handler(Resource resource) { this.resource = resource; + getLocations().add(resource); try { afterPropertiesSet(); } @@ -114,6 +115,11 @@ public class LogFileMvcEndpoint extends AbstractMvcEndpoint { } } + @Override + protected void initAllowedLocations() { + this.getLocations().clear(); + } + @Override protected Resource getResource(HttpServletRequest request) throws IOException { return this.resource;