diff --git a/front/src/app/api.ts b/front/src/app/api.ts index c4d680bf..a74504bf 100644 --- a/front/src/app/api.ts +++ b/front/src/app/api.ts @@ -1,7 +1,12 @@ import createAPI from "@/lib/api"; +const baseURL = + process.env.NODE_ENV === "development" + ? process.env.NEXT_PUBLIC_BACKEND_HOST || "" + : ""; + const api = createAPI({ - baseURL: `${process.env.NEXT_PUBLIC_BACKEND_HOST}`, + baseURL, withCredentials: true, });