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.zip
(11.0 kB
view details)
File details
Details for the file cherrypy-cors-1.3.zip.
File metadata
- Download URL: cherrypy-cors-1.3.zip
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea18dd0b926116aedcaab8964183f9d9e45d10c23acfbc75bd2b2ac5c79f2d04
|
|
| MD5 |
b1c4fca6932bf83e03eb61da4c07c94b
|
|
| BLAKE2b-256 |
a690c065656a37aa1ab9e2598f12386287633fc59d7fa19d0a3d0133f81ed951
|