Files
microdot/examples/cors/app.py
2023-03-23 00:03:21 +00:00

15 lines
261 B
Python

from microdot import Microdot
from microdot_cors import CORS
app = Microdot()
CORS(app, allowed_origins=['https://example.org'], allow_credentials=True)
@app.route('/')
def index(request):
return 'Hello World!'
if __name__ == '__main__':
app.run()