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
Close
Hashes for falcon_crossorigin-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 587aed72e5df50084a23d6b1c516bdd6fdd6e04ec845c243171081413ffc70cb |
|
MD5 | f8c8824d45cea6cb84951af78b712db9 |
|
BLAKE2b-256 | 7b8713121c0c8655b48997a9b2186f996772d8dc3361b57e6db548d6776475d4 |