Skip to content

Instantly share code, notes, and snippets.

@BrianSidebotham
Last active April 10, 2017 12:17
Show Gist options
  • Save BrianSidebotham/e51f3f2b355492c6f7c3a5ac08d46778 to your computer and use it in GitHub Desktop.
Save BrianSidebotham/e51f3f2b355492c6f7c3a5ac08d46778 to your computer and use it in GitHub Desktop.
Allow cross-origin in Python
# See https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
if __name__ == '__main__':
print "Content-Type: application/json"
print "Access-Control-Allow-Origin: *"
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment