summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/fenced-frame/resources/check-header-sec-fetch-dest.py
blob: 98231079b33c62d75ef27b8604669197a9a6dc35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import os


def main(request, response):
    response.headers.set(b"supports-loading-mode", b"fenced-frame")

    script = u"""
        <script src="utils.js"></script>
        <script>
            const [secfetch_key] = parseKeylist();
            writeValueToServer(secfetch_key, "%s")
        </script>
    """ % (request.headers.get(b"sec-fetch-dest", b"none"))
    return (200, [], script)