diff --git a/.env.development b/.env.development index 863cf89..ac4d44c 100644 --- a/.env.development +++ b/.env.development @@ -1,3 +1,4 @@ NEXT_PUBLIC_ENV=development ENV=development API_SERVER=http://127.0.0.1:6107/api/v1 +BACK_SERVER=http://127.0.0.1:6107 diff --git a/.env.local b/.env.local index 23141e3..6ec6066 100644 --- a/.env.local +++ b/.env.local @@ -1,3 +1,4 @@ NEXT_PUBLIC_ENV=local ENV=local API_SERVER=http://localhost:6107/api/v1 +BACK_SERVER=http://localhost:6107 diff --git a/.env.production b/.env.production index b67ccee..e614a6a 100644 --- a/.env.production +++ b/.env.production @@ -1,3 +1,4 @@ NEXT_PUBLIC_ENV=production ENV=production API_SERVER=http://127.0.0.1:6107/api/v1 +BACK_SERVER=http://127.0.0.1:6107 diff --git a/next.config.ts b/next.config.ts index 9490296..fe4a907 100644 --- a/next.config.ts +++ b/next.config.ts @@ -3,6 +3,7 @@ import {createEnv, createKriNextConfig, env} from "@kri/common/config"; const nextEnv = createEnv({ API_SERVER: env.required("API_SERVER", process.env.API_SERVER), + BACK_SERVER: env.required("BACK_SERVER", process.env.BACK_SERVER), }); const nextConfig = createKriNextConfig({ @@ -10,7 +11,7 @@ const nextConfig = createKriNextConfig({ return [ { source: "/files/:path*", - destination: `${nextEnv.API_SERVER}/files/:path*`, + destination: `${nextEnv.BACK_SERVER}/files/:path*`, }, ]; }, diff --git a/src/lib/env.server.ts b/src/lib/env.server.ts index caabce5..e1cde68 100644 --- a/src/lib/env.server.ts +++ b/src/lib/env.server.ts @@ -4,4 +4,5 @@ import { createEnv, env } from "@kri/common/config"; export const serverEnv = createEnv({ ENV: env.required("ENV", process.env.ENV), API_SERVER: env.required("API_SERVER", process.env.API_SERVER), + BACK_SERVER: env.required("BACK_SERVER", process.env.BACK_SERVER), });