omkar56 commited on
Commit
9e4ee07
·
1 Parent(s): 5bb11f5

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +10 -10
main.py CHANGED
@@ -16,16 +16,16 @@ VALID_IMAGE_EXTENSIONS = {"jpg", "jpeg", "png"}
16
 
17
  app = FastAPI()
18
  # CORS issue write below code
19
- origins = [
20
- "http://localhost:3000", # Update this with the actual origin of your frontend
21
- ]
22
- app.add_middleware(
23
- CORSMiddleware,
24
- allow_origins=origins,
25
- allow_credentials=True,
26
- allow_methods=["*"],
27
- allow_headers=["*"],
28
- )
29
  # ==========================
30
  api_key_header = APIKeyHeader(name="api_key", auto_error=False)
31
 
 
16
 
17
  app = FastAPI()
18
  # CORS issue write below code
19
+ # origins = [
20
+ # "http://localhost:3000", # Update this with the actual origin of your frontend
21
+ # ]
22
+ # app.add_middleware(
23
+ # CORSMiddleware,
24
+ # allow_origins=origins,
25
+ # allow_credentials=True,
26
+ # allow_methods=["*"],
27
+ # allow_headers=["*"],
28
+ # )
29
  # ==========================
30
  api_key_header = APIKeyHeader(name="api_key", auto_error=False)
31