The response headers were never getting set because of a bug in the
7c552c0
commit. This expands the loop into a more readable form and results in the
headers getting set.
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'POST, GET, OPTIONS',
'Access-Control-Allow-Headers': 'Content-Type, X-Requested-With'}
- (response.headers.set(key, value) for key, value in cors_headers)
+ for key, value in cors_headers.iteritems():
+ response.headers.set(key, value)
return response