Merge remote-tracking branch 'origin/iipbs/sn/dev' into iipbs/sn/ii
This commit is contained in:
@@ -3,7 +3,7 @@ NEXT_PUBLIC_PORT = 11302
|
||||
NEXT_PUBLIC_PROXY_HOST = http://con.mind-one.co.kr:11302
|
||||
NEXT_PUBLIC_SERVER_API_URL = http://dev.onasys.co.kr:8000
|
||||
NEXT_PUBLIC_GEOSERVER_URL = http://rsone.iptime.org:10010/geoserver
|
||||
NEXT_PUBLIC_TEMP_GEOSERVER_URL = http://con.mind-one.co.kr:11306/geoserver #TODO 운영에서 바꿔야 함
|
||||
NEXT_PUBLIC_LX_GEOSERVER_URL = http://con.mind-one.co.kr:11306/geoserver #TODO 운영에서 바꿔야 함
|
||||
NEXT_PUBLIC_CLAIM_NAME = Authorization
|
||||
NEXT_PUBLIC_AUTH_USER_ID = token-id
|
||||
NEXT_PUBLIC_ACCESS_TOKEN = access-token
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ NEXT_PUBLIC_PORT = 3002
|
||||
NEXT_PUBLIC_PROXY_HOST = http://localhost:3002
|
||||
NEXT_PUBLIC_SERVER_API_URL = http://dev.onasys.co.kr:8000
|
||||
NEXT_PUBLIC_GEOSERVER_URL = http://rsone.iptime.org:10010/geoserver
|
||||
NEXT_PUBLIC_TEMP_GEOSERVER_URL = http://con.mind-one.co.kr:11306/geoserver #TODO 운영에서 바꿔야 함
|
||||
NEXT_PUBLIC_LX_GEOSERVER_URL = http://con.mind-one.co.kr:11306/geoserver #TODO 운영에서 바꿔야 함
|
||||
NEXT_PUBLIC_CLAIM_NAME = Authorization
|
||||
NEXT_PUBLIC_AUTH_USER_ID = token-id
|
||||
NEXT_PUBLIC_ACCESS_TOKEN = access-token
|
||||
|
||||
+14
-19
@@ -5,7 +5,7 @@ const CLAIM_NAME = process.env.NEXT_PUBLIC_CLAIM_NAME || "Authorization";
|
||||
const SERVER_API_URL = process.env.NEXT_PUBLIC_SERVER_API_URL || "";
|
||||
const SEWERAGE_API_URL = process.env.NEXT_PUBLIC_SEWERAGE_API_URL || "";
|
||||
const GEOSERVER_URL = process.env.NEXT_PUBLIC_GEOSERVER_URL || "";
|
||||
const TEMP_GEOSERVER_URL = process.env.NEXT_PUBLIC_TEMP_GEOSERVER_URL || "";
|
||||
const LX_GEOSERVER_URL = process.env.NEXT_PUBLIC_LX_GEOSERVER_URL || "";
|
||||
|
||||
export function middleware(req: NextRequest) {
|
||||
console.log("Middleware 진입:", req.nextUrl.pathname);
|
||||
@@ -14,9 +14,8 @@ export function middleware(req: NextRequest) {
|
||||
|
||||
if (pathname.startsWith("/server")) {
|
||||
const queryParams = searchParams.toString();
|
||||
const newUrl = `${SERVER_API_URL}${pathname.replace("/server", "")}${
|
||||
queryParams ? `?${queryParams}` : ""
|
||||
}`;
|
||||
const newUrl = `${SERVER_API_URL}${pathname.replace("/server", "")}${queryParams ? `?${queryParams}` : ""
|
||||
}`;
|
||||
console.log(`[Middleware] Rewriting from '/server' path to: ${newUrl}`);
|
||||
return NextResponse.rewrite(new URL(newUrl));
|
||||
}
|
||||
@@ -24,21 +23,18 @@ export function middleware(req: NextRequest) {
|
||||
if (pathname.startsWith("/geoserver")) {
|
||||
const queryParams = searchParams.toString();
|
||||
|
||||
//TODO 운영에서 변경 해야함.
|
||||
const typename = searchParams.get("TYPENAME");
|
||||
|
||||
let newUrl = `${GEOSERVER_URL}${pathname.replace("/geoserver", "")}${
|
||||
queryParams ? `?${queryParams}` : ""
|
||||
}`;
|
||||
if (
|
||||
typename == "hasudo:tb_ms_swage_ppl" ||
|
||||
typename == "hasudo:tb_ms_swage_mhl" ||
|
||||
typename == "hasudo:tb_ms_swage_pmstn" ||
|
||||
typename == "hasudo:tb_ms_stofcbr"
|
||||
) {
|
||||
newUrl = `${TEMP_GEOSERVER_URL}${pathname.replace("/geoserver", "")}${
|
||||
queryParams ? `?${queryParams}` : ""
|
||||
let newUrl = `${GEOSERVER_URL}${pathname.replace("/geoserver", "")}${queryParams ? `?${queryParams}` : ""
|
||||
}`;
|
||||
if (
|
||||
typename == "hasudo:tb_ms_swage_ppl" || //관로
|
||||
typename == "hasudo:tb_ms_swage_mhl" || //맨홀
|
||||
typename == "hasudo:tb_ms_swage_pmstn" || //펌프장
|
||||
typename == "hasudo:tb_ms_stofcbr" //우수토실
|
||||
) {
|
||||
newUrl = `${LX_GEOSERVER_URL}${pathname.replace("/geoserver", "")}${queryParams ? `?${queryParams}` : ""
|
||||
}`;
|
||||
}
|
||||
console.log(`[Middleware] Rewriting from '/geoserver' path to: ${newUrl}`);
|
||||
return NextResponse.rewrite(new URL(newUrl));
|
||||
@@ -46,9 +42,8 @@ export function middleware(req: NextRequest) {
|
||||
|
||||
if (pathname.startsWith("/sewerage-service/api/v1/map/geometry")) {
|
||||
const queryParams = searchParams.toString();
|
||||
const newUrl = `${SEWERAGE_API_URL}${pathname.replace("/sewerage-service/api", "")}${
|
||||
queryParams ? `?${queryParams}` : ""
|
||||
}`;
|
||||
const newUrl = `${SEWERAGE_API_URL}${pathname.replace("/sewerage-service/api", "")}${queryParams ? `?${queryParams}` : ""
|
||||
}`;
|
||||
console.log(`[Middleware] Rewriting from '/geoserver' path to: ${newUrl}`);
|
||||
return NextResponse.rewrite(new URL(newUrl));
|
||||
}
|
||||
|
||||
@@ -77,7 +77,15 @@ GisOlLayer.prototype = {
|
||||
let lyrTyNm = options.lyrTyNm;
|
||||
let typename = this.storageNm + lyrTyNm;
|
||||
|
||||
if(options.lyrTyNm == "om_dt_untrt_swg_rain" || options.lyrTyNm == "om_wqlt_station" ){ //중점우수토실실, 관측소소
|
||||
if(options.lyrTyNm == "om_dt_untrt_swg_rain" //중점우수토실
|
||||
|| options.lyrTyNm == "om_wqlt_station" //관측소
|
||||
|| options.lyrTyNm == "tb_wr_bdst_ruse_fclt" //재이용시설
|
||||
|| options.lyrTyNm == "tb_wr_rnwtr_utztn_fclt" //빗물이용시설
|
||||
|| options.lyrTyNm == "tb_wr_rswtr_fclt" //중수도시설
|
||||
|| options.lyrTyNm == "tb_wr_htdfl_fclt" //온배수시설
|
||||
|| options.lyrTyNm == "tb_wr_tmpr_dmd_co" //잠재수요처
|
||||
)
|
||||
{
|
||||
url = GisApp.SN_GEOSERVER_URL;
|
||||
typename = lyrTyNm;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user