コード例 #1
0
def main(request, response):
    subresource.respond(request,
                        response,
                        payload_generator=generate_payload,
                        access_control_allow_origin=b"*",
                        content_type=b"application/json",
                        cache_control=b"no-store")
コード例 #2
0
ファイル: video.py プロジェクト: zachlewis2020/wpt
def main(request, response):
    handler = lambda data: generate_payload(request, data)
    subresource.respond(request,
                        response,
                        payload_generator=handler,
                        access_control_allow_origin=b"*",
                        content_type=b"video/ogg")
コード例 #3
0
ファイル: video.py プロジェクト: Honry/web-platform-tests
def main(request, response):
    handler = lambda data: generate_payload(request, data)
    subresource.respond(request,
                        response,
                        payload_generator = handler,
                        access_control_allow_origin = "*",
                        content_type = "video/ogg")
コード例 #4
0
def main(request, response):
    payload_generator = lambda data: generate_payload(request, data)
    if "import-rule" in request.GET:
        payload_generator = lambda data: generate_import_rule(request, data)

    subresource.respond(
        request,
        response,
        payload_generator=payload_generator,
        content_type="text/css",
        maybe_additional_headers={"Referrer-Policy": "unsafe-url"})
コード例 #5
0
ファイル: stylesheet.py プロジェクト: ConnorGBrewster/servo
def main(request, response):
    payload_generator = lambda data: generate_payload(request, data)
    if "import-rule" in request.GET:
        payload_generator = lambda data: generate_import_rule(request, data)

    subresource.respond(
        request,
        response,
        payload_generator = payload_generator,
        content_type = "text/css",
        maybe_additional_headers = { "Referrer-Policy": "unsafe-url" })
コード例 #6
0
def main(request, response):
    handler = lambda data: generate_payload(request, data)
    content_type = 'application/x-font-truetype'

    if "report-headers" in request.GET:
        handler = lambda data: generate_report_headers_payload(request, data)
        content_type = 'application/json'

    subresource.respond(request,
                        response,
                        payload_generator=handler,
                        content_type=content_type,
                        access_control_allow_origin="*")
コード例 #7
0
ファイル: font.py プロジェクト: Coder206/servo
def main(request, response):
    handler = lambda data: generate_payload(request, data)
    content_type = 'application/x-font-truetype'

    if "report-headers" in request.GET:
        handler = lambda data: generate_report_headers_payload(request, data)
        content_type = 'application/json'

    subresource.respond(request,
                        response,
                        payload_generator = handler,
                        content_type = content_type,
                        access_control_allow_origin = "*")
コード例 #8
0
ファイル: svg.py プロジェクト: Honry/web-platform-tests
def main(request, response):
    handler = lambda data: generate_payload(request, data)
    content_type = 'image/svg+xml'

    if "embedded-svg" in request.GET:
        handler = lambda data: generate_payload_embedded(request, data)

    if "report-headers" in request.GET:
        handler = lambda data: generate_report_headers_payload(request, data)
        content_type = 'application/json'

    subresource.respond(request,
                        response,
                        payload_generator = handler,
                        content_type = content_type)
コード例 #9
0
ファイル: svg.py プロジェクト: zachlewis2020/wpt
def main(request, response):
    handler = lambda data: generate_payload(request, data)
    content_type = b'image/svg+xml'

    if b"embedded-svg" in request.GET:
        handler = lambda data: generate_payload_embedded(request, data)

    if b"report-headers" in request.GET:
        handler = lambda data: generate_report_headers_payload(request, data)
        content_type = b'application/json'

    subresource.respond(request,
                        response,
                        payload_generator=handler,
                        content_type=content_type)
コード例 #10
0
def main(request, response):
    payload_generator = lambda data: generate_payload(request, data)
    content_type = "text/css"
    referrer_policy = "unsafe-url"
    if "import-rule" in request.GET:
        payload_generator = lambda data: generate_import_rule(request, data)

    if "report-headers" in request.GET:
        payload_generator = lambda data: generate_report_headers_payload(request, data)
        content_type = 'application/json'

    if "referrer-policy" in request.GET:
        referrer_policy = request.GET["referrer-policy"]

    subresource.respond(
        request,
        response,
        payload_generator = payload_generator,
        content_type = content_type,
        maybe_additional_headers = { "Referrer-Policy": referrer_policy })
コード例 #11
0
ファイル: stylesheet.py プロジェクト: bocoup/wpt-docs
def main(request, response):
    payload_generator = lambda data: generate_payload(request, data)
    content_type = "text/css"
    referrer_policy = "unsafe-url"
    if "import-rule" in request.GET:
        payload_generator = lambda data: generate_import_rule(request, data)

    if "report-headers" in request.GET:
        payload_generator = lambda data: generate_report_headers_payload(
            request, data)
        content_type = 'application/json'

    if "referrer-policy" in request.GET:
        referrer_policy = request.GET["referrer-policy"]

    subresource.respond(
        request,
        response,
        payload_generator=payload_generator,
        content_type=content_type,
        maybe_additional_headers={"Referrer-Policy": referrer_policy})
コード例 #12
0
def main(request, response):
    subresource.respond(request,
                        response,
                        payload_generator=generate_payload,
                        access_control_allow_origin="*",
                        content_type="text/plain")
コード例 #13
0
ファイル: static-import.py プロジェクト: graycatya/qtwebkit
def main(request, response):
    payload_generator = lambda _: generate_payload(request)
    subresource.respond(request,
                        response,
                        payload_generator=payload_generator,
                        content_type="application/javascript")
コード例 #14
0
ファイル: image.py プロジェクト: 0X1A/servo
def main(request, response):
    subresource.respond(request,
                        response,
                        payload_generator = generate_payload,
                        content_type = "image/bmp",
                        access_control_allow_origin = "*")
コード例 #15
0
ファイル: document.py プロジェクト: sokolovp/BraveMining
def main(request, response):
    subresource.respond(request, response, payload_generator=generate_payload)
コード例 #16
0
def main(request, response):
    subresource.respond(request,
                        response,
                        payload_generator=generate_payload,
                        content_type="image/png",
                        access_control_allow_origin="*")
コード例 #17
0
ファイル: document.py プロジェクト: CODECOMMUNITY/servo
def main(request, response):
    subresource.respond(request, response, payload_generator=generate_payload)
コード例 #18
0
ファイル: worker.py プロジェクト: Honry/web-platform-tests
def main(request, response):
    subresource.respond(request,
                        response,
                        payload_generator = generate_payload,
                        content_type = "application/javascript")
コード例 #19
0
def main(request, response):
    subresource.respond(request,
                        response,
                        payload_generator=generate_payload,
                        content_type="application/javascript")
コード例 #20
0
ファイル: empty.py プロジェクト: Honry/web-platform-tests
def main(request, response):
    subresource.respond(request,
                        response,
                        payload_generator = generate_payload,
                        access_control_allow_origin = "*",
                        content_type = "text/plain")