bottle-cors.py pNj vU ��g vU """ Example of setting up CORS with Bottle.py. """ from bottle import Bottle, request, response, run app = Bottle() @app.hook('after_request') def enable_cors(): """ You need to add some headers to each request. Don't use the wildcard '*' for Access-Control-Allow-Origin in production. """ response.headers['Access-Control-Allow-Origin'] = '*' response.headers['Access-Co
![Bottle with Cross-origin resource sharing (CORS)](https://cdn-ak-scissors.b.st-hatena.com/image/square/1ef26f6cb4349557952890dbe3e567f7f98dc151/height=288;version=1;width=512/https%3A%2F%2Fgithub.githubassets.com%2Fassets%2Fgist-og-image-54fd7dc0713e.png)