aminaj commited on
Commit
134d88b
·
verified ·
1 Parent(s): d331c41

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +0 -10
main.py CHANGED
@@ -25,7 +25,6 @@ import docx2txt
25
  import pptx
26
  import os
27
  import utils
28
- from fastapi.middleware.cors import CORSMiddleware
29
 
30
  ## APPLICATION LIFESPAN
31
  # Load the environment variables using FastAPI lifespan event so that they are available throughout the application
@@ -50,15 +49,6 @@ async def lifespan(app: FastAPI):
50
  # Initialize the FastAPI app
51
  app = FastAPI(lifespan=lifespan, docs_url="/")
52
 
53
- # Allow requests from all origins (replace * with specific origins if needed)
54
- app.add_middleware(
55
- CORSMiddleware,
56
- allow_origins=["*"],
57
- allow_credentials=True,
58
- allow_methods=["GET", "POST", "PUT", "DELETE"],
59
- allow_headers=["*"],
60
- )
61
-
62
  ## PYDANTIC MODELS
63
  # Define an APIKey Pydantic model for the request body
64
  class APIKey(BaseModel):
 
25
  import pptx
26
  import os
27
  import utils
 
28
 
29
  ## APPLICATION LIFESPAN
30
  # Load the environment variables using FastAPI lifespan event so that they are available throughout the application
 
49
  # Initialize the FastAPI app
50
  app = FastAPI(lifespan=lifespan, docs_url="/")
51
 
 
 
 
 
 
 
 
 
 
52
  ## PYDANTIC MODELS
53
  # Define an APIKey Pydantic model for the request body
54
  class APIKey(BaseModel):