fix:merubah helpert dan cors

This commit is contained in:
muhamad fais aizat 2025-05-16 15:54:35 +07:00
parent a9180b9b8c
commit b8471a05b0
2 changed files with 5 additions and 3 deletions

View File

@ -42,8 +42,9 @@ app.include_router(api_router)
# Middleware untuk CORS (Opsional, jika API digunakan oleh frontend)
app.add_middleware(
CORSMiddleware,
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=["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=["*"], # Ganti dengan domain frontend jika perlu
allow_credentials=False,
allow_methods=["*"],
allow_headers=["*"],

View File

@ -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";