summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/preload/resources/cross-origin-module.py
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/preload/resources/cross-origin-module.py')
-rw-r--r--testing/web-platform/tests/preload/resources/cross-origin-module.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/testing/web-platform/tests/preload/resources/cross-origin-module.py b/testing/web-platform/tests/preload/resources/cross-origin-module.py
new file mode 100644
index 0000000000..35dce5401c
--- /dev/null
+++ b/testing/web-platform/tests/preload/resources/cross-origin-module.py
@@ -0,0 +1,9 @@
+def main(request, response):
+ headers = [
+ (b"Content-Type", b"text/javascript"),
+ (b"Access-Control-Allow-Origin", request.headers.get(b"Origin")),
+ (b"Timing-Allow-Origin", request.headers.get(b"Origin")),
+ (b"Access-Control-Allow-Credentials", b"true")
+ ]
+
+ return headers, u"// Cross-origin module, nothing to see here"