임시 commit
This commit is contained in:
@@ -36,6 +36,10 @@ const nextConfig: NextConfig = {
|
||||
source: "/operation-service/:path*",
|
||||
destination: `${subDomain}/operation-service/:path*`,
|
||||
},
|
||||
{
|
||||
source: "/ngii-server/:path*",
|
||||
destination: `${subDomain}/ngii-server/:path*`,
|
||||
},
|
||||
],
|
||||
fallback: [],
|
||||
};
|
||||
|
||||
+2
-1
@@ -8,7 +8,8 @@ NEXT_PUBLIC_PROXY_HOST = http://localhost:3002
|
||||
NEXT_PUBLIC_GEOSERVER_URL = https://hasudo.geo.rsonesoft.com/geoserver
|
||||
NEXT_PUBLIC_LX_GEOSERVER_URL = http://con.mind-one.co.kr:11306/geoserver
|
||||
#NEXT_PUBLIC_NGII_URL = https://map.ngii.go.kr/openapi/Gettile.do?apiKey=04trYP9_xwLAfALjwZ-B8g&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/png&layer=korean_map&style=korean&tilematrixset=EPSG:5179&TileMatrix={z}&TileCol={x}&TileRow={y}
|
||||
NEXT_PUBLIC_NGII_URL = http://con.mind-one.co.kr:11083/sewerage-service/api/v1/basemap?apiKey=04trYP9_xwLAfALjwZ-B8g&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/png&layer=korean_map&style=korean&tilematrixset=EPSG:5179&TileMatrix={z}&TileCol={x}&TileRow={y}
|
||||
NEXT_PUBLIC_NGII_URL = https://map.ngii.go.kr
|
||||
NEXT_PUBLIC_NGII_PARAM = apiKey=04trYP9_xwLAfALjwZ-B8g&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/png&layer=korean_map&style=korean&tilematrixset=EPSG:5179&TileMatrix={z}&TileCol={x}&TileRow={y}
|
||||
NEXT_PUBLIC_SERVER_API_URL = http://dev.onasys.co.kr:8000
|
||||
NEXT_PUBLIC_SEWERAGE_API_URL = http://con.mind-one.co.kr:11083
|
||||
NEXT_PUBLIC_DC_URL = https://apigateway.apps.rsonesoft.com
|
||||
|
||||
@@ -8,7 +8,10 @@ NEXT_PUBLIC_REFRESH_TOKEN = refresh-token
|
||||
NEXT_PUBLIC_SERVER_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000
|
||||
NEXT_PUBLIC_GEOSERVER_URL = http://172.29.143.87:8080/geoserver
|
||||
NEXT_PUBLIC_LX_GEOSERVER_URL = http://172.29.143.87:8080/geoserver_swl
|
||||
NEXT_PUBLIC_NGII_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/sewerage-service/api/v1/basemap?apiKey=BDE2BEF39DAFEC293AB6730150F222AC&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/png&layer=korean_map&style=korean&tilematrixset=EPSG:5179&layer=korean_map&TileMatrix={z}&TileCol={y}&TileRow={x}
|
||||
#NEXT_PUBLIC_NGII_URL = http:///172.29.143.87/openapi/GetTile?apiKey=BDE2BEF39DAFEC293AB6730150F222AC&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/png&layer=korean_map&style=korean&tilematrixset=EPSG:5179&layer=korean_map&TileMatrix={z}&TileCol={y}&TileRow={x}
|
||||
#NEXT_PUBLIC_NGII_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/sewerage-service/api/v1/basemap?apiKey=BDE2BEF39DAFEC293AB6730150F222AC&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/png&layer=korean_map&style=korean&tilematrixset=EPSG:5179&layer=korean_map&TileMatrix={z}&TileCol={y}&TileRow={x}
|
||||
NEXT_PUBLIC_NGII_URL = http:///172.29.143.87
|
||||
NEXT_PUBLIC_NGII_PARAM = BDE2BEF39DAFEC293AB6730150F222AC&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/png&layer=korean_map&style=korean&tilematrixset=EPSG:5179&layer=korean_map&TileMatrix={z}&TileCol={y}&TileRow={x}
|
||||
NEXT_PUBLIC_SEWERAGE_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000
|
||||
NEXT_PUBLIC_DC_URL = http://apigateway.iipbs-was.svc.cluster.local:8000
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
* - 데이터 매핑 및 코드 변환 (시도/시군구, 보고서 유형 등)
|
||||
*
|
||||
* 🔗 사용 API
|
||||
* - 보고서 파일 조회: GET /api/v1/dc/file (dc-service)
|
||||
* - 파일 다운로드: GET /api/v1/dc/file/download (dc-service)
|
||||
* - 보고서 파일 조회: GET /api/v1/file (dc-service)
|
||||
* - 파일 다운로드: GET /api/v1/fileDownload (dc-service)
|
||||
*/
|
||||
import { getDcData } from '@/components/lib/api';
|
||||
import { fileDownload } from '@/utils';
|
||||
@@ -117,7 +117,7 @@ export default function useReportTab() {
|
||||
return [];
|
||||
}
|
||||
const queryString = 'clsfSystmSn=' + clsfSystmSn;
|
||||
const result = await getDcData(`/api/v1/dc/file${queryString ? `?${queryString}` : ''}`);
|
||||
const result = await getDcData(`/api/v1/file${queryString ? `?${queryString}` : ''}`);
|
||||
return result;
|
||||
};
|
||||
|
||||
@@ -146,7 +146,7 @@ export default function useReportTab() {
|
||||
return;
|
||||
}
|
||||
const queryString = 'filePath=' + encodeURIComponent(filePath);
|
||||
const responseBlob = await getDcData(`/api/v1/dc/file/download${queryString ? `?${queryString}` : ''}`, "blob");
|
||||
const responseBlob = await getDcData(`/api/v1/fileDownload${queryString ? `?${queryString}` : ''}`, "blob");
|
||||
fileDownload(responseBlob, fileName);
|
||||
}
|
||||
|
||||
|
||||
@@ -131,6 +131,13 @@ export function middleware(req: NextRequest) {
|
||||
return rewriteRequest;
|
||||
}
|
||||
|
||||
if (pathname.startsWith("/ngii-server")) {
|
||||
const decodedQuery = toDecodedQueryString(searchParams);
|
||||
const newUrl = `${process.env.NEXT_PUBLIC_NGII_URL}${pathname.replace("/ngii-server", "")}${decodedQuery ? `?${decodedQuery}` : ""}`;
|
||||
console.log(`[Middleware] Rewriting from '${pathname}' path to: ${newUrl}`);
|
||||
return NextResponse.rewrite(new URL(newUrl));
|
||||
}
|
||||
|
||||
return NextResponse.next();
|
||||
}
|
||||
|
||||
@@ -144,6 +151,7 @@ export const config = {
|
||||
"/cms-service/:path*",
|
||||
"/dc-service/:path*",
|
||||
"/sewerage-service/:path*",
|
||||
"/ngii-server/:path*",
|
||||
],
|
||||
|
||||
};
|
||||
|
||||
@@ -13,7 +13,8 @@ NEXT_PUBLIC_GEOSERVER_URL = http://172.29.143.87:8080/geoserver
|
||||
NEXT_PUBLIC_LX_GEOSERVER_URL = http://172.29.143.87:8080/geoserver_swl
|
||||
NEXT_PUBLIC_WR_SERVER_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/reuse-service/api/v1
|
||||
NEXT_PUBLIC_SEWERAGE_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/sewerage-service/api
|
||||
NEXT_PUBLIC_NGII_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/sewerage-service/api/v1/basemap?apiKey=BDE2BEF39DAFEC293AB6730150F222AC&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/png&layer=korean_map&style=korean&tilematrixset=EPSG:5179&layer=korean_map&TileMatrix={z}&TileCol={y}&TileRow={x}
|
||||
NEXT_PUBLIC_NGII_URL = http:///172.29.143.87
|
||||
NEXT_PUBLIC_NGII_PARAM = BDE2BEF39DAFEC293AB6730150F222AC&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/png&layer=korean_map&style=korean&tilematrixset=EPSG:5179&layer=korean_map&TileMatrix={z}&TileCol={y}&TileRow={x}
|
||||
|
||||
NEXT_PUBLIC_FINDADRESS_URL=https://business.juso.go.kr/addrlink/addrLinkApi.do
|
||||
NEXT_PRIVATE_WR_ADDRESS_KEY = U01TXOFVVEgyMDI1MDgyODE0MTAxNzExNjEyMjA=
|
||||
@@ -13,6 +13,18 @@ const OPERATION_API_URL = process.env.NEXT_PUBLIC_FO_SERVER_API_URL || "";
|
||||
const BUSINESS_JUSO_API_URL = process.env.NEXT_PUBLIC_FINDADRESS_URL || "";
|
||||
const AdressKey = process.env.NEXT_PRIVATE_WR_ADDRESS_KEY || "";
|
||||
|
||||
/** 공통: URLSearchParams의 값을 decodeURIComponent 적용하여 querystring 생성 */
|
||||
function toDecodedQueryString(params: URLSearchParams): string {
|
||||
const entries: string[][] = Array.from(params.entries()).map(([k, v]) => {
|
||||
try {
|
||||
return [k, decodeURIComponent(v)] as string[];
|
||||
} catch {
|
||||
return [k, v] as string[];
|
||||
}
|
||||
});
|
||||
return new URLSearchParams(entries).toString();
|
||||
}
|
||||
|
||||
/** 공통: 요청 헤더에 쿠키 기반 인증 값 주입 */
|
||||
function buildAuthHeaders(req: NextRequest): Headers {
|
||||
const requestHeaders = new Headers(req.headers);
|
||||
@@ -160,6 +172,12 @@ export function middleware(req: NextRequest) {
|
||||
return NextResponse.rewrite(new URL(newUrl));
|
||||
}
|
||||
|
||||
if (pathname.startsWith("/ngii-server")) {
|
||||
const decodedQuery = toDecodedQueryString(searchParams);
|
||||
const newUrl = `${process.env.NEXT_PUBLIC_NGII_URL}${pathname.replace("/ngii-server", "")}${decodedQuery ? `?${decodedQuery}` : ""}`;
|
||||
console.log(`[Middleware] Rewriting from '${pathname}' path to: ${newUrl}`);
|
||||
return NextResponse.rewrite(new URL(newUrl));
|
||||
}
|
||||
|
||||
return NextResponse.next();
|
||||
}
|
||||
@@ -175,6 +193,7 @@ export const config = {
|
||||
"/reuse-service/:path*",
|
||||
"/operation-service/:path*",
|
||||
"/bussiness-juso-service/:path*",
|
||||
"/ngii-server/:path*",
|
||||
"/"
|
||||
],
|
||||
};
|
||||
|
||||
@@ -36,6 +36,10 @@ const nextConfig: NextConfig = {
|
||||
source: "/operation-service/:path*",
|
||||
destination: `${subDomain}/operation-service/:path*`,
|
||||
},
|
||||
{
|
||||
source: "/ngii-server/:path*",
|
||||
destination: `${subDomain}/ngii-server/:path*`,
|
||||
},
|
||||
],
|
||||
fallback: [],
|
||||
};
|
||||
|
||||
@@ -41,7 +41,8 @@ GisApp.GOOGLE_HYBRID_URL = `https://mt1.google.com/vt/lyrs=y&x={x}&y={y}&z={z}&k
|
||||
GisApp.GOOGLE_3D_URL = `https://tile.googleapis.com/v1/3dtiles/root.json?key=${GisApp.GOOGLE_API_KEY}`;
|
||||
|
||||
// NGII 정보(배경지도)
|
||||
GisApp.NGII_WMTS_URL = process.env.NEXT_PUBLIC_NGII_URL;
|
||||
//GisApp.NGII_WMTS_URL = process.env.NEXT_PUBLIC_NGII_URL;
|
||||
GisApp.NGII_WMTS_URL = `/ngii-server/openapi/Gettile?${process.env.NEXT_PUBLIC_NGII_PARAM}`;
|
||||
|
||||
GisApp.EMAP_URL = '/emap/';
|
||||
GisApp.EMAP_SATELLITE_URL = '/emap/satellite/';
|
||||
|
||||
Reference in New Issue
Block a user