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.4.1.tar.gz
(6.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cherrypy-cors-1.4.1.tar.gz.
File metadata
- Download URL: cherrypy-cors-1.4.1.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ec1b8d66e3c2ef8ba8ce2367e51ace1be4fde0d4a20bbf9c5b14b56a9718eb5
|
|
| MD5 |
05cba450d07eaeb6a557f62241f29dc1
|
|
| BLAKE2b-256 |
fff93f5c54be7330c694fcc934422947ee3688aa7c2ace545919e5bcace03761
|
File details
Details for the file cherrypy_cors-1.4.1-py2.py3-none-any.whl.
File metadata
- Download URL: cherrypy_cors-1.4.1-py2.py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f32a2bcf402f805777eaaed518619c1b20e4318727f61620aa5449de1822b4e
|
|
| MD5 |
c6d267f82328b7333bdfa5d5297005a4
|
|
| BLAKE2b-256 |
c6d2091d65855e52d2882445c18e86d1a8acedb7d809bb7f058e5dcf3b7a94d5
|