1
0
Fork 0
firefox/testing/web-platform/tests/resource-timing/resources/preflight.py
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

9 lines
463 B
Python

def main(request, response):
response.headers.set(b"Access-Control-Allow-Origin", b"*")
response.headers.set(b"Access-Control-Max-Age", b"0")
response.headers.set(b"Timing-Allow-Origin", b"*")
# If this script is accessed with the header X-Require-Preflight then the
# browser will send a preflight request. Otherwise it won't.
if request.method == u'OPTIONS':
response.headers.set(b"Access-Control-Allow-Headers",
b"X-Require-Preflight")