Module: tools Branch: master Commit: a24ddb1c0fd1fbe896490db0b763da119627b7ab URL: https://source.winehq.org/git/tools.git/?a=commit;h=a24ddb1c0fd1fbe896490db0...
Author: Gabriel Ivăncescu gabrielopcode@gmail.com Date: Thu May 26 17:13:54 2022 +0300
winetest/tests: Add CORS page for testing CORS and XDomainRequest.
"text/plain" content type is important since native has too many restrictions on XDomainRequest and doesn't support anything else. The fact the file is a html page also enables detection testing instead of it reading the header only.
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
winetest/tests/.htaccess | 7 +++++++ winetest/tests/cors.html | 1 + 2 files changed, 8 insertions(+)
diff --git a/winetest/tests/.htaccess b/winetest/tests/.htaccess index 73bab30..18c8b24 100644 --- a/winetest/tests/.htaccess +++ b/winetest/tests/.htaccess @@ -24,3 +24,10 @@ Header set Pragma "no-cache" Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT" </ifModule> </FilesMatch> + +<Files cors.html> +<ifModule mod_headers.c> +Header set Access-Control-Allow-Origin "*" +Header set Content-Type "text/plain" +</ifModule> +</Files> diff --git a/winetest/tests/cors.html b/winetest/tests/cors.html new file mode 100644 index 0000000..3a73f89 --- /dev/null +++ b/winetest/tests/cors.html @@ -0,0 +1 @@ +<html><body>test</body></html>