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.
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
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.6.tar.gz.
File metadata
- Download URL: cherrypy-cors-1.6.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7fb75f6e617ce29c9ec3fdd8b1ff6ec64fec2c56371182525e22bcf4c180513
|
|
| MD5 |
0bc45e2d0af3013ca589c5fe912212e7
|
|
| BLAKE2b-256 |
488ccff674e8ba0fbe12ddee8b106ff7793c0d42e2a5153bd7882d01d5178edd
|
File details
Details for the file cherrypy_cors-1.6-py2.py3-none-any.whl.
File metadata
- Download URL: cherrypy_cors-1.6-py2.py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb512e20fa9e478abd1868b1417814a4e9240ed0c403472a2c624460e49ab0d5
|
|
| MD5 |
b2e4b998274d456f968bdadaa1482751
|
|
| BLAKE2b-256 |
8ceb2dde33117abfb7a856e0ed2f554f0f4ad97477465c7708a53531e3661370
|