From c5002cb694bf9c62da25ad6a4a29cbd609c6049b Mon Sep 17 00:00:00 2001 From: "LORENZO\\pacio" Date: Mon, 29 Sep 2025 15:59:34 +0200 Subject: [PATCH] cors --- app/main.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/main.py b/app/main.py index 68c96d7..fcea8e6 100644 --- a/app/main.py +++ b/app/main.py @@ -8,16 +8,17 @@ from app.db import get_engine, run_query, run_execute app = FastAPI(title="Polo informatico SQL API", version="1.0.0") ALLOWED_ORIGINS = [ - "http://192.168.10.94/", - "http://192.168.10.94:8080/", + "http://localhost:3080", "http://localhost:8080", "http://localhost", + "http://192.168.10.94", + "http://192.168.10.94:8080", "http://172.17.0.1:38500" ] app.add_middleware( CORSMiddleware, - allow_origins=ALLOWED_ORIGINS, + allow_origins=["*"], allow_credentials=False, # set True only if you use cookies/auth allow_methods=["GET", "POST", "OPTIONS"], # include OPTIONS for preflight allow_headers=["*"], # or list specific headers