Falcon cross-origin middleware
Project description
falcon-crossorigin
A simple Falcon module for Cross-Origin Resource Sharing (CORS).
Install
pip install falcon-crossorigin
Usage
import falcon
from falcon_crossorigin import CrossOrigin
cross_origin = CrossOrigin(
allow_origins="https://app.example.com",
allow_methods="GET,POST",
allow_headers="Pragma,Expires,Cache-Control",
allow_credentials=True,
expose_headers="Link",
max_age=3600,
)
api = falcon.API(middleware=[cross_origin])
Credits
Port of Echo's CORS middleware.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file falcon-crossorigin-1.0.0.tar.gz
.
File metadata
- Download URL: falcon-crossorigin-1.0.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca4d94c07d655b699809e1864e47102f83283d0255699abe2ed5e88b5f3bb766 |
|
MD5 | 8d6514fdec9bb82a74bf682395b26203 |
|
BLAKE2b-256 | 5b7ef657474083782124c723b73a26e74a1ff59c0c10f3a828a1acd068115d47 |
File details
Details for the file falcon_crossorigin-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: falcon_crossorigin-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 587aed72e5df50084a23d6b1c516bdd6fdd6e04ec845c243171081413ffc70cb |
|
MD5 | f8c8824d45cea6cb84951af78b712db9 |
|
BLAKE2b-256 | 7b8713121c0c8655b48997a9b2186f996772d8dc3361b57e6db548d6776475d4 |