[tools] winetest/tests: Add CORS page for testing CORS and XDomainRequest.

Gabriel Ivăncescu gabrielopcode at gmail.com
Thu May 26 09:13:54 CDT 2022


"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 at gmail.com>
---
 winetest/tests/.htaccess | 7 +++++++
 winetest/tests/cors.html | 1 +
 2 files changed, 8 insertions(+)
 create mode 100644 winetest/tests/cors.html

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>
-- 
2.34.1




More information about the wine-devel mailing list