Last active
July 7, 2017 10:31
-
-
Save hirobert/f1feabd04f7e439e229f 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 flask import make_response | |
def cors_response(data): | |
response = make_response(data) | |
response.headers['Access-Control-Allow-Origin'] = '*' | |
return response |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Look also: https://flask-cors.readthedocs.io/en/latest/