DATAREST-1581 - Fixed CORS defaults to include all HTTP methods exposed by Spring Data REST.
The fix for DATAREST-1535 has changed the default allowed methods for CORS requests to a smaller set than we originally returned. This commit reinstantiates the default to be set to all HTTP methods, Spring Data repositories support by default. Related tickets: DATAREST-1535.
This commit is contained in:
@@ -64,7 +64,9 @@ public class RepositoryCorsConfigurationAccessorUnitTests {
|
||||
assertThat(configuration.getAllowCredentials()).isNull();
|
||||
assertThat(configuration.getAllowedHeaders()).contains("*");
|
||||
assertThat(configuration.getAllowedOrigins()).contains("*");
|
||||
assertThat(configuration.getAllowedMethods()).contains("HEAD", "GET", "POST");
|
||||
assertThat(configuration.getAllowedMethods())
|
||||
.contains("HEAD", "GET", "POST", "PUT", "PATCH", "OPTIONS")
|
||||
.doesNotContain("TRACE");
|
||||
assertThat(configuration.getMaxAge()).isEqualTo(1800L);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user