cors
This commit is contained in:
parent
9235a52e9d
commit
c5002cb694
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user