blob: b838c5414e6a1d2a3d6ffa5c9b3f82ac6373f904 [file] [log] [blame]
#!/usr/bin/env python3
import os
import sys
from urllib.parse import parse_qs
query = parse_qs(os.environ.get('QUERY_STRING', ''), keep_blank_values=True)
meta_value = query.get('meta_value', [''])[0]
http_value = query.get('http_value', [''])[0]
sys.stdout.write(
'status: 200\r\n'
'Referrer-Policy: {}\r\n'
'Content-Type: text/html\r\n\r\n'
'\r\n'
'<!DOCTYPE html>\r\n'
'<html>\r\n'
'<head><meta name=\'referrer\' content=\'{}\'></head>\r\n'
'<body>\r\n'
'<iframe src=\'postReferrer.py\'></iframe>\r\n'
'</body>\r\n'
'</html>\r\n'.format(http_value, meta_value)
)