refresh.py (384B)
1 def main(request, response): 2 """ 3 Respond with a blank HTML document and a `Refresh` header which describes 4 an immediate redirect to the URL specified by the requests `location` query 5 string parameter 6 """ 7 headers = [ 8 (b'Content-Type', b'text/html'), 9 (b'Refresh', b'0; URL=' + request.GET.first(b'location')) 10 ] 11 return (200, headers, b'')