https://github.com/joegasewicz/bobtail-cors
Cors for Bobtail
https://github.com/joegasewicz/bobtail-cors
Last synced: 6 months ago
JSON representation
Cors for Bobtail
- Host: GitHub
- URL: https://github.com/joegasewicz/bobtail-cors
- Owner: joegasewicz
- License: mit
- Created: 2022-11-11T22:46:00.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-11-12T19:18:12.000Z (almost 3 years ago)
- Last Synced: 2025-03-11T01:53:58.012Z (7 months ago)
- Language: Python
- Size: 12.7 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/joegasewicz/bobtail-cors/actions/workflows/python-publish.yml)
[](https://github.com/joegasewicz/bobtail-cors/actions/workflows/python-package.yml)# Bobtail CORS
CORS middleware for [Bobtail](https://github.com/joegasewicz/bobtail)### Install
```
pip install bobtail-cors
```### Usage
The default CORS set by
```python
from bobtail_cors import BobtailCORSapp = Bobtail(routes=routes)
app.use(BobtailCORS())
```
If you require
```python
# Declare your CORS options
options = {
"origin": "http://nottoboard.com",
"headers": "Authorization, Content-Type",
"methods": "GET",
}
app.use(BobtailCORS(options=options))
```