Add :cors for cross-domain XHR (with README update)

This commit is contained in:
2014-06-28 00:59:13 +02:00
parent 230659a34b
commit 226441d821
2 changed files with 4 additions and 0 deletions

View File

@@ -757,6 +757,9 @@ def cgi_app(environ, start_response):
headers['status'] = '200 OK'
headers['etag'] = '"%s"' % int(time.time())
if options.cors:
headers['access-control-allow-origin'] = '*'
if options.html or options.reader:
headers['content-type'] = 'text/html'
elif options.debug or options.txt: