A Flask extension adding a decorator for CORS support
Project description
Flask-CORS is a simple extension to Flask allowing you to support cross origin resource sharing (CORS) using a simple decorator.
Installation
Install the extension with using pip, or easy_install.
$ pip install flask-cors
Usage
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.
Simple Usage
@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 documentation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Flask-Cors-1.1.tar.gz
(8.5 kB
view details)
File details
Details for the file Flask-Cors-1.1.tar.gz.
File metadata
- Download URL: Flask-Cors-1.1.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f9cd29b50ef98015c008243adeaf4e673b953845202f1fad9d7f42340ff7af7
|
|
| MD5 |
272da7aebd9eed69ae1a89829028e149
|
|
| BLAKE2b-256 |
0f1faa820332d5ffcee66e84da9e506d9bc44577fe314ba9218d4236c8d39a3a
|