Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Simple plugin to easily enable CORS support in Bottle routes.
from bottle import Bottle, request, run
from truckpad.bottle.cors import CorsPlugin, enable_cors
app = Bottle()
@app.get('/')
def index():
"""
CORS is disabled for this route
"""
return "cors is disabled here"
@enable_cors
@app.get('/endpoint_1')
def endpoint_1():
"""
CORS is enabled for this route.
OPTIONS requests will be handled by the plugin itself
"""
return "cors is enabled, OPTIONS handled by plugin"
@enable_cors
@app.route('/endpoint_2', method=['GET', 'POST', 'OPTIONS'])
def endpoint_2():
"""
CORS is enabled for this route.
OPTIONS requests will be handled by *you*
"""
if request.method == 'OPTIONS':
# do something here?
pass
return "cors is enabled, OPTIONS handled by you!"
app.install(CorsPlugin(origins=['http://list.of.allowed.domains.com', 'https://another.domain.org']))
run(app)
FAQs
CORS plugin for Bottle framework
We found that bottle-cors demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.