diff --git a/apps/fo/.env.local b/apps/fo/.env.local index bf6d56f58..693b6e7ef 100644 --- a/apps/fo/.env.local +++ b/apps/fo/.env.local @@ -5,6 +5,7 @@ NEXT_PUBLIC_AUTH_USER_ID = token-id NEXT_PUBLIC_ACCESS_TOKEN = access-token NEXT_PUBLIC_REFRESH_TOKEN = refresh-token NEXT_PUBLIC_PROXY_HOST = http://localhost:3000 +NEXT_PUBLIC_SUB_DOMAIN = http://localhost:13000 #NEXT_PUBLIC_CM_LOGIN_PAGE_URL = http://localhost:3001/auth/login NEXT_PUBLIC_SERVER_API_URL = http://con.mind-one.co.kr:11083/operation-service NEXT_PUBLIC_WR_SERVER_API_URL = http://con.mind-one.co.kr:11083/reuse-service/ @@ -17,6 +18,7 @@ NEXT_PUBLIC_NGII_URL = https://map.ngii.go.kr NEXT_PUBLIC_NGII_PARAM = 04trYP9_xwLAfALjwZ-B8g&service=WMTS&request=GetTile&version=1.0.0&format=image/png&layer=korean_map&style=korean&tilematrixset=korean&tilematrix={z}&tilecol={x}&tilerow={y} NEXT_PUBLIC_CM_LOGIN_PAGE_URL = http://dev.onasys.co.kr:3000/auth/login + #NEXT_PUBLIC_SERVER_API_URL = http://localhost:8883/operation-service REACT_EDITOR=atom \ No newline at end of file diff --git a/apps/fo/.env.mindone b/apps/fo/.env.mindone index 2003db503..f014168c2 100644 --- a/apps/fo/.env.mindone +++ b/apps/fo/.env.mindone @@ -5,7 +5,7 @@ NEXT_PUBLIC_AUTH_USER_ID = token-id NEXT_PUBLIC_ACCESS_TOKEN = access-token NEXT_PUBLIC_REFRESH_TOKEN = refresh-token NEXT_PUBLIC_PROXY_HOST = http://con.mind-one.co.kr:11300 -NEXT_PUBLIC_SUB_DOMAIN = http://con.mind-one.co.kr:11300 +NEXT_PUBLIC_SUB_DOMAIN = http://con.mind-one.co.kr:13000 NEXT_PUBLIC_CM_LOGIN_PAGE_URL = http://dev.onasys.co.kr:3000/auth/login #NEXT_PUBLIC_SERVER_API_URL = http://con.mind-one.co.kr:11082 NEXT_PUBLIC_SERVER_API_URL = http://con.mind-one.co.kr:11083/operation-service diff --git a/apps/fo/next.config.ts b/apps/fo/next.config.ts index 709fd3cf6..6a892461e 100644 --- a/apps/fo/next.config.ts +++ b/apps/fo/next.config.ts @@ -1,7 +1,7 @@ import type { NextConfig } from "next"; -const subDomain = - process.env.NEXT_PUBLIC_PROXY_HOST || "http://localhost:3000"; +const domain = process.env.NEXT_PUBLIC_PROXY_HOST || "http://localhost:3000"; +const subDomain = process.env.NEXT_PUBLIC_SUB_DOMAIN || "http://localhost:13000"; const nextConfig: NextConfig = { output: "standalone", @@ -18,7 +18,7 @@ const nextConfig: NextConfig = { { type: "header", key: "referer", - value: "(.*)/pst(.*)", + value: "(.*)/cms(.*)", }, ], }, @@ -26,19 +26,23 @@ const nextConfig: NextConfig = { afterFiles: [ { source: "/sewerage-service/:path*", - destination: `${subDomain}/sewerage-service/:path*`, + destination: `${domain}/sewerage-service/:path*`, }, { source: "/reuse-service/:path*", - destination: `${subDomain}/reuse-service/:path*`, + destination: `${domain}/reuse-service/:path*`, }, { source: "/operation-service/:path*", - destination: `${subDomain}/operation-service/:path*`, + destination: `${domain}/operation-service/:path*`, }, { source: "/ngii-server/:path*", - destination: `${subDomain}/ngii-server/:path*`, + destination: `${domain}/ngii-server/:path*`, + }, + { + source: "/cms/:path*", + destination: `${subDomain}/cms/:path*`, }, ], fallback: [], diff --git a/apps/fo/src/entities/auth/lib/auth-wrapper.tsx b/apps/fo/src/entities/auth/lib/auth-wrapper.tsx index 0c2d04830..864b54ce0 100644 --- a/apps/fo/src/entities/auth/lib/auth-wrapper.tsx +++ b/apps/fo/src/entities/auth/lib/auth-wrapper.tsx @@ -1,7 +1,7 @@ "use client"; import { useEffect } from "react"; -import { useRouter, usePathname } from "next/navigation"; +import { useRouter } from "next/navigation"; import { client } from "@/src/shared/api"; import type { IUserInfo } from "@/src/shared/store"; import { useUserStore, getCookie } from "@/src/shared/lib"; @@ -12,7 +12,7 @@ const LOGIN_PAGE_URL = process.env.NEXT_PUBLIC_CM_LOGIN_PAGE_URL || "http://loca const AuthWrapper = ({ children }: { children: React.ReactNode }) => { const router = useRouter(); - const pathname = usePathname(); + // const pathname = usePathname(); const { userInfo, setUserInfo } = useUserStore((state) => state); async function authCheck() { @@ -53,7 +53,7 @@ const AuthWrapper = ({ children }: { children: React.ReactNode }) => { } } })(); - }, [pathname]); + }, []); return <>{children}; }; diff --git a/apps/sn/next.config.ts b/apps/sn/next.config.ts index 66724c419..ac726f759 100644 --- a/apps/sn/next.config.ts +++ b/apps/sn/next.config.ts @@ -6,16 +6,34 @@ const subDomain = const nextConfig: NextConfig = { output: "standalone", experimental: { - proxyTimeout: 600000, // 10분 (밀리초 단위) - }, - typescript: { - ignoreBuildErrors: true, // 이 줄 추가 + proxyTimeout: 600000, }, eslint: { ignoreDuringBuilds: true, }, + typescript: { + ignoreBuildErrors: true, + }, + logging: { + fetches: { + fullUrl: true, + }, + }, async rewrites() { return { + beforeFiles: [ + { + source: "/_next/static/:path*", + destination: `${subDomain}/_next/static/:path*`, + has: [ + { + type: "header", + key: "referer", + value: "(.*)/cms(.*)", + }, + ], + }, + ], afterFiles: [ { source: "/cms/:path*", diff --git a/apps/wr/.env.local b/apps/wr/.env.local index f418f679e..db59d33c4 100644 --- a/apps/wr/.env.local +++ b/apps/wr/.env.local @@ -5,6 +5,7 @@ NEXT_PUBLIC_AUTH_USER_ID = token-id NEXT_PUBLIC_ACCESS_TOKEN = access-token NEXT_PUBLIC_REFRESH_TOKEN = refresh-token NEXT_PUBLIC_PROXY_HOST = http://localhost:3001 +NEXT_PUBLIC_SUB_DOMAIN = http://localhost:13000 NEXT_PUBLIC_SERVER_API_URL = http://dev.onasys.co.kr:8000 NEXT_PUBLIC_FO_SERVER_API_URL = http://con.mind-one.co.kr:11083/operation-service/api/v1 NEXT_PUBLIC_CS_SERVER_API_URL = http://dev.onasys.co.kr:8000 diff --git a/apps/wr/.env.mindone b/apps/wr/.env.mindone index 4a928a910..8749fe39f 100644 --- a/apps/wr/.env.mindone +++ b/apps/wr/.env.mindone @@ -5,6 +5,7 @@ NEXT_PUBLIC_AUTH_USER_ID = token-id NEXT_PUBLIC_ACCESS_TOKEN = access-token NEXT_PUBLIC_REFRESH_TOKEN = refresh-token NEXT_PUBLIC_PROXY_HOST = http://con.mind-one.co.kr:11301 +NEXT_PUBLIC_SUB_DOMAIN = http://con.mind-one.co.kr:13000 NEXT_PUBLIC_SERVER_API_URL = http://dev.onasys.co.kr:8000 NEXT_PUBLIC_FO_SERVER_API_URL = http://con.mind-one.co.kr:11083/operation-service/api/v1 NEXT_PUBLIC_CS_SERVER_API_URL = http://dev.onasys.co.kr:8000 diff --git a/apps/wr/next.config.ts b/apps/wr/next.config.ts index 709fd3cf6..6a892461e 100644 --- a/apps/wr/next.config.ts +++ b/apps/wr/next.config.ts @@ -1,7 +1,7 @@ import type { NextConfig } from "next"; -const subDomain = - process.env.NEXT_PUBLIC_PROXY_HOST || "http://localhost:3000"; +const domain = process.env.NEXT_PUBLIC_PROXY_HOST || "http://localhost:3000"; +const subDomain = process.env.NEXT_PUBLIC_SUB_DOMAIN || "http://localhost:13000"; const nextConfig: NextConfig = { output: "standalone", @@ -18,7 +18,7 @@ const nextConfig: NextConfig = { { type: "header", key: "referer", - value: "(.*)/pst(.*)", + value: "(.*)/cms(.*)", }, ], }, @@ -26,19 +26,23 @@ const nextConfig: NextConfig = { afterFiles: [ { source: "/sewerage-service/:path*", - destination: `${subDomain}/sewerage-service/:path*`, + destination: `${domain}/sewerage-service/:path*`, }, { source: "/reuse-service/:path*", - destination: `${subDomain}/reuse-service/:path*`, + destination: `${domain}/reuse-service/:path*`, }, { source: "/operation-service/:path*", - destination: `${subDomain}/operation-service/:path*`, + destination: `${domain}/operation-service/:path*`, }, { source: "/ngii-server/:path*", - destination: `${subDomain}/ngii-server/:path*`, + destination: `${domain}/ngii-server/:path*`, + }, + { + source: "/cms/:path*", + destination: `${subDomain}/cms/:path*`, }, ], fallback: [],