@@ -1532,8 +1532,12 @@ Y_UNIT_TEST_SUITE(Mvp) {
1532
1532
{
1533
1533
TStringBuilder response;
1534
1534
response << " HTTP/1.1 " << status << " \r\n "
1535
- << " Connection: close\r\n "
1536
- << " Content-Type: " << contentType << " \r\n " ;
1535
+ << " Connection: close\r\n "
1536
+ << " Content-Type: " << contentType << " \r\n "
1537
+ << " Access-Control-Allow-Origin: *\r\n "
1538
+ << " Access-Control-Allow-Credentials: true\r\n "
1539
+ << " Access-Control-Allow-Methods: GET, POST, OPTIONS\r\n "
1540
+ << " Access-Control-Allow-Headers: Authorization, Content-Type\r\n " ;
1537
1541
for (const auto & [key, value] : extraHeaders) {
1538
1542
response << key << " : " << value << " \r\n " ;
1539
1543
}
@@ -1623,6 +1627,10 @@ Y_UNIT_TEST_SUITE(Mvp) {
1623
1627
NJson::TJsonValue json;
1624
1628
NHttp::THeaders headers (outgoing->Response ->Headers );
1625
1629
1630
+ UNIT_ASSERT (headers.Has (" Access-Control-Allow-Credentials" ));
1631
+ UNIT_ASSERT (headers.Has (" Access-Control-Allow-Headers" ));
1632
+ UNIT_ASSERT (headers.Has (" Access-Control-Allow-Methods" ));
1633
+ UNIT_ASSERT (headers.Has (" Access-Control-Allow-Origin" ));
1626
1634
if (!outgoing->Response ->Status .StartsWith (" 3" ) && outgoing->Response ->Status != " 404" ) {
1627
1635
UNIT_ASSERT (headers.Has (" Content-Type" ));
1628
1636
UNIT_ASSERT_STRINGS_EQUAL (headers.Get (" Content-Type" ).NextTok (' ;' ), " application/json" );
0 commit comments