OLD | NEW |
1 def main(request, response): | 1 def main(request, response): |
2 if "url" in request.GET: | 2 if "url" in request.GET: |
3 headers = [("Location", request.GET["url"])] | 3 headers = [("Location", request.GET["url"])] |
4 return 302, headers, '' | 4 return 302, headers, '' |
5 | 5 |
6 return [], ''' | 6 status = 200 |
| 7 |
| 8 if "noLocationRedirect" in request.GET: |
| 9 status = 302 |
| 10 |
| 11 return status, [], ''' |
7 <!DOCTYPE html> | 12 <!DOCTYPE html> |
8 <script> | 13 <script> |
9 window.parent.postMessage( | 14 window.parent.postMessage( |
10 { | 15 { |
11 id: 'last_url', | 16 id: 'last_url', |
12 result: location.href | 17 result: location.href |
13 }, '*'); | 18 }, '*'); |
14 </script> | 19 </script> |
15 ''' | 20 ''' |
OLD | NEW |