Skip to content

Commit

Permalink
Added cors
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Sunglasses authored Dec 10, 2023
1 parent 7c14f1b commit e032cb2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/paste/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down

0 comments on commit e032cb2

Please sign in to comment.