Added cors origin

This commit is contained in:
Saurab-Shrestha 2024-02-05 14:39:59 +05:45
parent 3d58a3d568
commit 226c1a6622
6 changed files with 74 additions and 6 deletions

View file

@ -40,7 +40,8 @@ def create_app(root_injector: Injector) -> FastAPI:
app.add_middleware(
CORSMiddleware,
allow_credentials=True,
allow_origins=["http://localhost:80", "http://10.1.101.125:80", "http://quickgpt.gibl.com.np:80", "http://10.1.101.125", "http://quickgpt.gibl.com.np"],
allow_origins=["http://localhost:80/", "http://10.1.101.125:80", "http://quickgpt.gibl.com.np:80",
"http://10.1.101.125", "http://quickgpt.gibl.com.np", "http://localhost:8001", "http://192.168.1.93", "http://192.168.1.93:88", "http://192.168.1.98", "http://192.168.1.98:5173", "http://localhost:5173"],
allow_methods=["DELETE", "GET", "POST", "PUT", "OPTIONS", "PATCH"],
allow_headers=["*"],
)