diff --git a/dbms/tests/queries/0_stateless/00372_cors_header.reference b/dbms/tests/queries/0_stateless/00372_cors_header.reference new file mode 100644 index 00000000000..968ac3ef02d --- /dev/null +++ b/dbms/tests/queries/0_stateless/00372_cors_header.reference @@ -0,0 +1,4 @@ +1 +0 +0 +0 diff --git a/dbms/tests/queries/0_stateless/00372_cors_header.sh b/dbms/tests/queries/0_stateless/00372_cors_header.sh new file mode 100755 index 00000000000..bdcff850fca --- /dev/null +++ b/dbms/tests/queries/0_stateless/00372_cors_header.sh @@ -0,0 +1,4 @@ +curl -vsS 'http://localhost:8123/?add_http_cors_header=1' -H "Origin:smi2.ru" --data-binary @- <<< "SELECT 1" 2>&1 | grep -F "< Access-Control-Allow-Origin: *" | wc -l +curl -vsS 'http://localhost:8123/?add_http_cors_header=0' -H "Origin:smi2.ru" --data-binary @- <<< "SELECT 1" 2>&1 | grep -F "< Access-Control-Allow-Origin: *" | wc -l +curl -vsS 'http://localhost:8123/' -H "Origin:smi2.ru" --data-binary @- <<< "SELECT 1" 2>&1 | grep -F "< Access-Control-Allow-Origin: *" | wc -l +curl -vsS 'http://localhost:8123/?add_http_cors_header=1' --data-binary @- <<< "SELECT 1" 2>&1 | grep -F "< Access-Control-Allow-Origin: *" | wc -l