blob: 9ea6aae1034a56929bfa9674a8bdc35a427d2aa1 [file] [log] [blame]
#!/usr/bin/env python3
import os
import sys
referer = os.environ.get('HTTP_REFERER', '')
if 'file:' in referer.lower():
sys.stdout.write('Location: http://127.0.0.1:8000/security/resources/red200x100.png\r\n')
else:
sys.stdout.write('Location: http://127.0.0.1:8000/security/resources/green250x50.png\r\n')
sys.stdout.write('Content-Type: text/html\r\n\r\n')