summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/client-hints/inner-delegation/resources/was-sec-ch-device-memory-received.py
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/client-hints/inner-delegation/resources/was-sec-ch-device-memory-received.py')
-rw-r--r--testing/web-platform/tests/client-hints/inner-delegation/resources/was-sec-ch-device-memory-received.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/testing/web-platform/tests/client-hints/inner-delegation/resources/was-sec-ch-device-memory-received.py b/testing/web-platform/tests/client-hints/inner-delegation/resources/was-sec-ch-device-memory-received.py
new file mode 100644
index 0000000000..f57e121252
--- /dev/null
+++ b/testing/web-platform/tests/client-hints/inner-delegation/resources/was-sec-ch-device-memory-received.py
@@ -0,0 +1,11 @@
+def main(request, response):
+ """
+ Simple handler that sets the status based on whether sec-ch-device-memory was received.
+ """
+ response.headers.append(b"Access-Control-Allow-Origin", b"*")
+ response.headers.append(b"Access-Control-Allow-Headers", b"*")
+ response.headers.append(b"Access-Control-Expose-Headers", b"*")
+ if b"sec-ch-device-memory" in request.headers:
+ response.status = 200
+ else:
+ response.status = 400 \ No newline at end of file