Created
August 4, 2014 05:37
-
-
Save brendanmckenzie/d50b32fbd25bc276dcf7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from config import WEB_ROOT | |
def init_cors(app): | |
@app.after_request | |
def add_cors_headers(response): | |
response.headers.add('Access-Control-Allow-Origin', WEB_ROOT) | |
response.headers.add('Access-Control-Allow-Credentials', 'true') | |
response.headers.add('Access-Control-Allow-Headers', 'Content-Type') | |
return response |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment