diff options
Diffstat (limited to 'testing/web-platform/tests/preload/resources/echo-referrer.py')
-rw-r--r-- | testing/web-platform/tests/preload/resources/echo-referrer.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/testing/web-platform/tests/preload/resources/echo-referrer.py b/testing/web-platform/tests/preload/resources/echo-referrer.py new file mode 100644 index 0000000000..287e000f8f --- /dev/null +++ b/testing/web-platform/tests/preload/resources/echo-referrer.py @@ -0,0 +1,6 @@ +def main(request, response): + response_headers = [(b"Access-Control-Allow-Origin", b"*"), (b"Content-Type", b"text/javascript")] + body = b""" + window.referrers["%s"] = "%s"; + """ % (request.GET.first(b"uid", b""), request.headers.get(b"referer", b"")) + return (200, response_headers, body) |