I didn't add a test case for cross-origin requests. I only had about 30
mins right now, and I couldn't get a valid test in that time. Since the
front-end development relies on this feature, I think it's worth
shipping now.
Alternate implementation:
Using Flask-CORS was quick and easy for now, but if we want to remove
that dependency in the future, here's a code snippet showing how to add
a crossdomain decorator:
Fixes #14
This commit adds the Flask-CORS dependency to allow all cross-site requests on our API. There is no CORS testcase yet, but I wrote a stub and a note.
Here's a link to Flask-CORS:
https://flask-cors.readthedocs.io/en/latest/
TODO:
I didn't add a test case for cross-origin requests. I only had about 30 mins right now, and I couldn't get a valid test in that time. Since the front-end development relies on this feature, I think it's worth shipping now.
Alternate implementation:
Using Flask-CORS was quick and easy for now, but if we want to remove that dependency in the future, here's a code snippet showing how to add a
crossdomain
decorator:http://flask.pocoo.org/snippets/56/