A Flask extension adding a decorator for CORS support
Flask-CORS is a simple extension to Flask allowing you to support cross origin resource sharing (CORS) using a simple decorator.
Install the extension with using pip, or easy_install.
$ pip install flask-cors
This extension exposes a simple decorator to decorate flask routes with. Simply add @cross_origin() below a call to Flask’s @app.route(..) incanation to accept the default options and allow CORS on a given route.
@app.route("/") @cross_origin() # allow all origins all methods. def helloWorld(): return "Hello, cross-origin-world!"
For a full list of options, please see the full documentation
A simple set of tests is included in test.py. To run, install nose, and simply invoke nosetests or run python test.py to exercise the tests.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size Flask-Cors-1.1.1.tar.gz (8.8 kB)||File type Source||Python version None||Upload date||Hashes View|