Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for wsgi_cors_middleware, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size wsgi-cors-middleware-0.0.2.tar.gz (2.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page