Skip to main content

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

Metadata

Release files for wsgi_cors_middleware 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wsgi_cors_middleware 0.0.2
File Size Uploaded
wsgi-cors-middleware-0.0.2.tar.gz 2.7 kB Details

Release files / wsgi-cors-middleware-0.0.2.tar.gz

Download URL wsgi-cors-middleware-0.0.2.tar.gz
Size 2.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1470e3cfb46e58e2bb3de976688cb1a6571a694fefb27ba2ff5d7bb850083052
BLAKE2b-256 checksum
How to use checksums
aee8b57c8fe4cd76bce850a7038ef27f7d1c9f1110df121a91f0251083fb038b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.2 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page