blob: 5171ac27a0fe84e907d6c7c8b8aaced39946da2c [file] [log] [blame]
#!/usr/bin/env python3
import os
import sys
import time
sys.stdout.write('Content-Type: text/html\r\n')
if os.environ.get('REQUEST_METHOD') == 'GET':
sys.stdout.write(
'status: 302\r\n'
'Location: http://localhost:8000/xmlhttprequest/resources/redirect-cors-origin-null-pass.py\r\n'
)
if os.environ.get('HTTP_ORIGIN'):
sys.stdout.write('Access-Control-Allow-Origin: {}\r\n'.format(
os.environ.get('HTTP_ORIGIN')
))
sys.stdout.write('\r\n')