fix:merubah helpert dan cors
This commit is contained in:
parent
a9180b9b8c
commit
b8471a05b0
|
@ -42,8 +42,9 @@ app.include_router(api_router)
|
||||||
# Middleware untuk CORS (Opsional, jika API digunakan oleh frontend)
|
# Middleware untuk CORS (Opsional, jika API digunakan oleh frontend)
|
||||||
app.add_middleware(
|
app.add_middleware(
|
||||||
CORSMiddleware,
|
CORSMiddleware,
|
||||||
allow_origins=["http://localhost:5173"], # Ganti dengan domain frontend jika perlu
|
# allow_origins=["http://localhost:5173"], # Ganti dengan domain frontend jika perlu
|
||||||
# allow_origins=["https://svr-tomato-price-prediction-frontend.vercel.app"], # Ganti dengan domain frontend jika perlu
|
allow_origins=["https://svr-tomato-price-prediction-frontend.vercel.app"], # Ganti dengan domain frontend jika perlu
|
||||||
|
allow_origins=["*"], # Ganti dengan domain frontend jika perlu
|
||||||
allow_credentials=False,
|
allow_credentials=False,
|
||||||
allow_methods=["*"],
|
allow_methods=["*"],
|
||||||
allow_headers=["*"],
|
allow_headers=["*"],
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
export const API_URL ="http://127.0.0.1:8000";
|
// export const API_URL ="http://127.0.0.1:8000";
|
||||||
|
export const API_URL ="http://api-predict-z2es.onrender.com";
|
Loading…
Reference in New Issue