Skip to content

Commit

Permalink
Cors added
Browse files Browse the repository at this point in the history
  • Loading branch information
mayurrawte committed Sep 16, 2023
1 parent 1e41ccf commit 83e4eb6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from fastapi import FastAPI, UploadFile, File
from fastapi.responses import FileResponse
from fastapi.middleware.cors import CORSMiddleware

import tempfile
import secrets
import subprocess
Expand All @@ -8,6 +10,15 @@
from utils import save_temp_file, create_post_script_file

app = FastAPI()
origins = ['*']

app.add_middleware(
CORSMiddleware,
allow_origins=origins,
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)



Expand Down

0 comments on commit 83e4eb6

Please sign in to comment.