Fix failing tests

This commit ensures that if an Origin is returned as it was provided,
possibly with a trailing slash.

See gh-26892
This commit is contained in:
Rossen Stoyanchev
2021-05-10 14:15:16 +01:00
parent dc4e053d59
commit aa51ed1940
3 changed files with 12 additions and 12 deletions

View File

@@ -284,7 +284,7 @@ class CrossOriginTests {
CorsConfiguration config = getCorsConfiguration(chain, false);
assertThat(config).isNotNull();
assertThat(config.getAllowedMethods()).containsExactly("GET");
assertThat(config.getAllowedOrigins()).containsExactly("http://www.foo.example/");
assertThat(config.getAllowedOrigins()).containsExactly("http://www.foo.example");
assertThat(config.getAllowCredentials()).isTrue();
}
@@ -297,7 +297,7 @@ class CrossOriginTests {
CorsConfiguration config = getCorsConfiguration(chain, false);
assertThat(config).isNotNull();
assertThat(config.getAllowedMethods()).containsExactly("GET");
assertThat(config.getAllowedOrigins()).containsExactly("http://www.foo.example/");
assertThat(config.getAllowedOrigins()).containsExactly("http://www.foo.example");
assertThat(config.getAllowCredentials()).isTrue();
}