Skip to content

Instantly share code, notes, and snippets.

@hirobert
Last active July 7, 2017 10:31
Show Gist options
  • Save hirobert/f1feabd04f7e439e229f to your computer and use it in GitHub Desktop.
Save hirobert/f1feabd04f7e439e229f to your computer and use it in GitHub Desktop.
from flask import make_response
def cors_response(data):
response = make_response(data)
response.headers['Access-Control-Allow-Origin'] = '*'
return response
@tokland
Copy link

tokland commented Jul 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment