Skip to main content
Help us improve Python packaging – donate today!

CORS handling as a cherrypy tool.

Project Description

CORS support for CherryPy

License

License is indicated in the project metadata (typically one or more of the Trove classifiers). For more details, see this explanation.

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,
    }
}

See simple-example for a runnable example.

Release history Release notifications

This version
History Node

1.6

History Node

1.5

History Node

1.4.1

History Node

1.4

History Node

1.3.1

History Node

1.3

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
cherrypy_cors-1.6-py2.py3-none-any.whl (6.0 kB) Copy SHA256 hash SHA256 Wheel py2.py3 Sep 20, 2017
cherrypy-cors-1.6.tar.gz (9.5 kB) Copy SHA256 hash SHA256 Source None Sep 20, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page