Skip to content

Commit

Permalink
Update main_api.py
Browse files Browse the repository at this point in the history
Enable ansari.endeavorpal. Switch origin checking to be strict.
  • Loading branch information
waleedkadous authored Apr 1, 2024
1 parent 898014b commit f1a8ad7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@
"http://ansari.chat",
"https://client2.endeavorpal.com",
"http://client2.endeavorpal.com",
"https://ansari.endeavorpal.com",
"http://ansari.endeavorpal.com"
]

app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_origins=origins,
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
Expand Down Expand Up @@ -49,4 +51,4 @@ async def complete(request: Request):
return presenter.complete(body)
else:
raise HTTPException(status_code=403, detail="CORS not permitted")


0 comments on commit f1a8ad7

Please sign in to comment.