Skip to main content

CORS handling as a cherrypy tool.

Project description

cherrypy_cors

CORS support for CherryPy

In a nutshell

In your application, either install the tool globally.

import cherrypy_cors
cherrypy_cors.install()

Or add it to your application explicitly.

import cherrypy_cors
app = cherrypy.tree.mount(...)
app.toolboxes['cors'] = cherrypy_cors.tools

Then, enable it in your cherrypy config. For example, to enable it for all static resources.

config = {
    '/static': {
        'tools.staticdir.on': True,
        'cors.expose.on': True,
    }
}

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

cherrypy-cors-1.3.1.tar.gz (8.2 kB view details)

Uploaded Source

File details

Details for the file cherrypy-cors-1.3.1.tar.gz.

File metadata

  • Download URL: cherrypy-cors-1.3.1.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cherrypy-cors-1.3.1.tar.gz
Algorithm Hash digest
SHA256 16a850e9fc785d89ae82ffc098bb5b5df4e073d593b90cc317aeff1339359863
MD5 c9d9eb366476dc9df031823239665df3
BLAKE2b-256 9331a68baddb01827e77413c2282671e62fb04ca5f0d6ec24b0e2e9620c04d75

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page