summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/xhr/resources/access-control-allow-with-body.py
blob: 18564e2d44e7f4387487a227cb5e3793d9a4633a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
def main(request, response):
    headers = {
        b"Cache-Control": b"no-store",
        b"Access-Control-Allow-Headers": b"X-Requested-With",
        b"Access-Control-Max-Age": 0,
        b"Access-Control-Allow-Origin": b"*",
        b"Access-Control-Allow-Methods": b"*",
        b"Vary": b"Accept-Encoding",
        b"Content-Type": b"text/plain"
    }

    for (name, value) in headers.items():
        response.headers.set(name, value)

    response.content = b"PASS"