This file looks large and may slow your browser down if we attempt
to syntax highlight it, so we are showing it without any
pretty colors.
Highlight
it anyway.
1 |
|
2 |
|
3 |
def make_cross_origin_headers(response, host_url): |
4 |
print 'client\'s host_url: %s' % host_url |
5 |
response.headers['Access-Control-Allow-Origin'] = host_url |
6 |
response.headers['Access-Control-Max-Age'] = '3600' |
7 |
response.headers['Access-Control-Allow-Credentials'] = 'true' |
8 |
response.headers['Access-Control-Allow-Headers'] = 'Origin, X-Requested-With, Content-Type, Accept' |
9 |
|
10 |
print 'Updated headers' |
11 |
print response.headers |
12 |
|
13 |
return response |