summaryrefslogtreecommitdiffstats
path: root/test/wpt/tests/fetch/cross-origin-resource-policy/resources/redirect.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/wpt/tests/fetch/cross-origin-resource-policy/resources/redirect.py')
-rw-r--r--test/wpt/tests/fetch/cross-origin-resource-policy/resources/redirect.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/wpt/tests/fetch/cross-origin-resource-policy/resources/redirect.py b/test/wpt/tests/fetch/cross-origin-resource-policy/resources/redirect.py
new file mode 100644
index 0000000..0dad4dd
--- /dev/null
+++ b/test/wpt/tests/fetch/cross-origin-resource-policy/resources/redirect.py
@@ -0,0 +1,6 @@
+def main(request, response):
+ headers = [(b"Location", request.GET[b'redirectTo'])]
+ if b'corp' in request.GET:
+ headers.append((b'Cross-Origin-Resource-Policy', request.GET[b'corp']))
+
+ return 302, headers, b""