Cross Origin Resource Sharing (CORS) Middleware for WSGI Applications.
Project description
Cross Origin Resource Sharing (CORS) Middleware for WSGI Applications.
Usage
Use the CorsMiddleware from wsgi_cors_middleware.
from wsgi_cors_middleware import CorsMiddleware
application = CorsMiddleware(
application,
origin='*',
methods=['POST', 'PUT'],
headers=['Content-Type', 'Authorization']
)
Options
origin: URI that may access this application
credentials: indicates that the request can be made using credentials
headers: list of headers that may be used when accessing this application
methods: list of methods allowed to access this application
expose_headers: list of headers to be exposed to the browser
max_age: number of seconds a preflight request may be cached
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
Close
Hashes for wsgi-cors-middleware-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1470e3cfb46e58e2bb3de976688cb1a6571a694fefb27ba2ff5d7bb850083052 |
|
MD5 | a5d0b127f7cee681a18f33b93d9d7764 |
|
BLAKE2b-256 | aee8b57c8fe4cd76bce850a7038ef27f7d1c9f1110df121a91f0251083fb038b |