blob: f523019e0ece9a7f8bb1725397d086e694316d31 [file] [log] [blame]
def main(request, response):
headers = [("Content-Type", "text/html"), ("Vary", "Cookie")]
document = """
<!DOCTYPE html>
<script>
function test() {
var result = '%(cookie)s';
window.opener.postMessage(result, '*');
}
</script>
<body onload="test()">
"""
return headers, document % {'cookie': request.headers.get("Cookie", "") }