|
|
@ -57,7 +57,8 @@ public class SimpleUrlHandlerCorsTests extends BaseWebClientTests { |
|
|
|
assertThat(bodyToMono.block()).isNull(); |
|
|
|
assertThat(bodyToMono.block()).isNull(); |
|
|
|
assertThat(asHttpHeaders.getAccessControlAllowOrigin()) |
|
|
|
assertThat(asHttpHeaders.getAccessControlAllowOrigin()) |
|
|
|
.as("Missing header value in response: " |
|
|
|
.as("Missing header value in response: " |
|
|
|
+ HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN).isEqualTo("*"); |
|
|
|
+ HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN) |
|
|
|
|
|
|
|
.isEqualTo("*"); |
|
|
|
assertThat(asHttpHeaders.getAccessControlAllowMethods()) |
|
|
|
assertThat(asHttpHeaders.getAccessControlAllowMethods()) |
|
|
|
.as("Missing header value in response: " |
|
|
|
.as("Missing header value in response: " |
|
|
|
+ HttpHeaders.ACCESS_CONTROL_ALLOW_METHODS) |
|
|
|
+ HttpHeaders.ACCESS_CONTROL_ALLOW_METHODS) |
|
|
@ -76,7 +77,8 @@ public class SimpleUrlHandlerCorsTests extends BaseWebClientTests { |
|
|
|
assertThat(bodyToMono.block()).isNotNull(); |
|
|
|
assertThat(bodyToMono.block()).isNotNull(); |
|
|
|
assertThat(asHttpHeaders.getAccessControlAllowOrigin()) |
|
|
|
assertThat(asHttpHeaders.getAccessControlAllowOrigin()) |
|
|
|
.as("Missing header value in response: " |
|
|
|
.as("Missing header value in response: " |
|
|
|
+ HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN).isEqualTo("*"); |
|
|
|
+ HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN) |
|
|
|
|
|
|
|
.isEqualTo("*"); |
|
|
|
assertThat(clientResponse.statusCode()).as("CORS request failed.") |
|
|
|
assertThat(clientResponse.statusCode()).as("CORS request failed.") |
|
|
|
.isEqualTo(HttpStatus.NOT_FOUND); |
|
|
|
.isEqualTo(HttpStatus.NOT_FOUND); |
|
|
|
} |
|
|
|
} |
|
|
|