diff --git a/src/paste/main.py b/src/paste/main.py index d217eb2..bff165f 100644 --- a/src/paste/main.py +++ b/src/paste/main.py @@ -5,8 +5,19 @@ from pathlib import Path from fastapi import FastAPI from fastapi.templating import Jinja2Templates +from fastapi.middleware.cors import CORSMiddleware from .utils import generate_uuid +origins = ["*"] + +app.add_middleware( + CORSMiddleware, + allow_origins=origins, + allow_credentials=True, + allow_methods=["*"], + allow_headers=["*"], +) + app = FastAPI(title="paste.py 🐍") large_uuid_storage = []