|
|
@ -160,6 +160,15 @@ public class MvcEndpointCorsIntegrationTests {
|
|
|
|
header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_CREDENTIALS, "true"));
|
|
|
|
header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_CREDENTIALS, "true"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
|
|
public void credentialsCanBeDisabled() throws Exception {
|
|
|
|
|
|
|
|
EnvironmentTestUtils.addEnvironment(this.context,
|
|
|
|
|
|
|
|
"endpoints.cors.allowed-origins:foo.example.com",
|
|
|
|
|
|
|
|
"endpoints.cors.allow-credentials:false");
|
|
|
|
|
|
|
|
performAcceptedCorsRequest().andExpect(
|
|
|
|
|
|
|
|
header().doesNotExist(HttpHeaders.ACCESS_CONTROL_ALLOW_CREDENTIALS));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void jolokiaEndpointUsesGlobalCorsConfiguration() throws Exception {
|
|
|
|
public void jolokiaEndpointUsesGlobalCorsConfiguration() throws Exception {
|
|
|
|
EnvironmentTestUtils.addEnvironment(this.context,
|
|
|
|
EnvironmentTestUtils.addEnvironment(this.context,
|
|
|
|