Merge pull request #12926 from izeye:application-context-header

* pr/12926:
  Remove ManagementServerProperties.addApplicationContextHeader
This commit is contained in:
Stephane Nicoll 2018-04-24 10:17:28 +02:00
commit dc9254c3b2
3 changed files with 6 additions and 14 deletions

View File

@ -55,11 +55,6 @@ public class ManagementServerProperties implements SecurityPrerequisite {
@NestedConfigurationProperty
private Ssl ssl;
/**
* Add the "X-Application-Context" HTTP header in each response.
*/
private boolean addApplicationContextHeader = false;
/**
* Returns the management port or {@code null} if the
* {@link ServerProperties#getPort() server port} should be used.
@ -99,14 +94,6 @@ public class ManagementServerProperties implements SecurityPrerequisite {
return this.servlet;
}
public boolean getAddApplicationContextHeader() {
return this.addApplicationContextHeader;
}
public void setAddApplicationContextHeader(boolean addApplicationContextHeader) {
this.addApplicationContextHeader = addApplicationContextHeader;
}
/**
* Servlet properties.
*/

View File

@ -1229,6 +1229,12 @@
"level": "error"
}
},
{
"name": "management.server.add-application-context-header",
"type": "java.lang.Boolean",
"description": "Add the \"X-Application-Context\" HTTP header in each response.",
"defaultValue": false
},
{
"name": "management.shell.auth.jaas.domain",
"type": "java.lang.String",

View File

@ -33,7 +33,6 @@ public class ManagementServerPropertiesTests {
ManagementServerProperties properties = new ManagementServerProperties();
assertThat(properties.getPort()).isNull();
assertThat(properties.getServlet().getContextPath()).isEqualTo("");
assertThat(properties.getAddApplicationContextHeader()).isFalse();
}
@Test