Merge branch '1.1.x'
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2014 the original author or authors.
|
||||
* Copyright 2012-2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -75,6 +75,7 @@ import org.springframework.util.StringUtils;
|
||||
* used as a security hint by the filter created here.
|
||||
*
|
||||
* @author Dave Syer
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@Configuration
|
||||
@ConditionalOnWebApplication
|
||||
@@ -276,8 +277,9 @@ public class ManagementSecurityAutoConfiguration {
|
||||
if (endpoint.isSensitive() == secure) {
|
||||
String path = endpointHandlerMapping.getPath(endpoint.getPath());
|
||||
paths.add(path);
|
||||
// Ensure that nested paths are secured
|
||||
paths.add(path + "/**");
|
||||
// Add Spring MVC-generated additional paths
|
||||
paths.add(path + "/");
|
||||
paths.add(path + ".*");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013-2014 the original author or authors.
|
||||
* Copyright 2013-2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -42,6 +42,7 @@ import org.springframework.web.util.UrlPathHelper;
|
||||
* {@link MvcEndpoint} to expose Jolokia.
|
||||
*
|
||||
* @author Christian Dupuis
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@ConfigurationProperties(prefix = "endpoints.jolokia", ignoreUnknownFields = false)
|
||||
public class JolokiaMvcEndpoint implements MvcEndpoint, InitializingBean,
|
||||
@@ -57,7 +58,7 @@ public class JolokiaMvcEndpoint implements MvcEndpoint, InitializingBean,
|
||||
/**
|
||||
* Enable security on the endpoint.
|
||||
*/
|
||||
private boolean sensitive;
|
||||
private boolean sensitive = true;
|
||||
|
||||
/**
|
||||
* Enable the endpoint.
|
||||
|
||||
Reference in New Issue
Block a user