fix: 운영실태(fo), 물재이용(wr) 프록시 라우트 파일 추가
This commit is contained in:
+2
-2
@@ -11,9 +11,9 @@ 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
|
||||
NEXT_PUBLIC_NGII_URL = https://map.ngii.go.kr/openapi/Gettile.do?apiKey=04trYP9_xwLAfALjwZ-B8g&layer=korean_map&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_SEWERAGE_API_URL = http://con.mind-one.co.kr:11083
|
||||
NEXT_PUBLIC_DC_URL = https://apigateway.apps.rsonesoft.com
|
||||
NEXT_PUBLIC_CM_LOGIN_PAGE_URL = http://dev.onasys.co.kr:3000/auth/login
|
||||
#NEXT_PUBLIC_SEWERAGE_API_URL=http://192.168.1.128:8883
|
||||
#NEXT_PUBLIC_SEWERAGE_API_URL=http://192.168.1.222:8883
|
||||
# NEXT_PUBLIC_SEWERAGE_API_URL=http://192.168.1.66:8883
|
||||
NEXT_PUBLIC_SEWERAGE_API_URL=http://192.168.1.66:8883
|
||||
|
||||
@@ -151,7 +151,9 @@ const Page = () => {
|
||||
sbmrgPrevntBizNm: fileName,
|
||||
rgtr: tokenManager.getToken(AUTH_USER_ID) || null
|
||||
}
|
||||
console.log('registFile json =>', json);
|
||||
const data = await postData('v1/sbmrgPrevnt', json)
|
||||
console.log('registFile data =>', data);
|
||||
if (data) {
|
||||
alert('파일이 등록되었습니다.');
|
||||
setIsUploadModalOpen(false);
|
||||
|
||||
@@ -60,7 +60,9 @@ export const postData = async (url: string, data: object): Promise<any> => {
|
||||
};
|
||||
|
||||
export const postMutiPart = async (url: string, data: FormData): Promise<any> => {
|
||||
const res = await axios.post(`${BASE_URL}/${url}`, data);
|
||||
const res = await axios.post(`${BASE_URL}/${url}`, data, {
|
||||
timeout: 600000, // 10분
|
||||
});
|
||||
return res.data;
|
||||
};
|
||||
|
||||
|
||||
@@ -72,6 +72,11 @@ const FileUploadForm = ({
|
||||
handleUploadWithResponse(files, currentFile)
|
||||
.then(({ atflCd, atflId }) => {
|
||||
// 업로드 완료 후 onSubmit 실행
|
||||
console.log('fileNm', fileNm);
|
||||
console.log('selectedYear', selectedYear);
|
||||
console.log('selectedQuarter', selectedQuarter);
|
||||
console.log('atflCd', atflCd);
|
||||
console.log('atflId', atflId);
|
||||
onSubmit(fileNm, selectedYear, selectedQuarter, atflCd || '', atflId || '');
|
||||
|
||||
// UI 초기화
|
||||
@@ -120,6 +125,8 @@ const FileUploadForm = ({
|
||||
reject(error);
|
||||
};
|
||||
|
||||
console.log('Starting upload for files:', files);
|
||||
|
||||
// 기존 handleUpload 유틸리티 사용 (수정하지 않음)
|
||||
handleUpload(files, {
|
||||
handleUploadStart: setUpload,
|
||||
@@ -160,6 +167,10 @@ const FileUploadForm = ({
|
||||
setFileName(firstFile.name);
|
||||
setCurrentFile(firstFile);
|
||||
|
||||
console.log('selectedFiles', selectedFiles);
|
||||
console.log('firstFile', firstFile);
|
||||
console.log('firstFile name', firstFile.name);
|
||||
|
||||
if (onFileSelect) {
|
||||
onFileSelect(firstFile, internalAtflCd, internalAtflId);
|
||||
}
|
||||
|
||||
+13
-2
@@ -104,9 +104,20 @@ export function middleware(req: NextRequest) {
|
||||
|| pathname.startsWith("/cms-service")
|
||||
|| pathname.startsWith("/user-service")
|
||||
) {
|
||||
const requestHeaders = new Headers(req.headers);
|
||||
const token = req.cookies.get(CLAIM_NAME)?.value;
|
||||
const userId = req.cookies.get(AUTH_USER_ID)?.value;
|
||||
const newUrl = `${SERVER_API_URL}${pathname}`;
|
||||
console.log(`[Middleware] Rewriting from '/attach-service' path to: ${newUrl}`);
|
||||
return rewriteWith(newUrl, req, true);
|
||||
|
||||
if (token) requestHeaders.set(CLAIM_NAME, token);
|
||||
if (userId) requestHeaders.set(AUTH_USER_ID, userId);
|
||||
|
||||
console.log(
|
||||
`[Middleware] Rewriting from '/attach-service' path to: ${newUrl}`,
|
||||
);
|
||||
return NextResponse.rewrite(new URL(newUrl), {
|
||||
headers: requestHeaders,
|
||||
});
|
||||
}
|
||||
|
||||
if (pathname.startsWith("/dc-service")) {
|
||||
|
||||
Reference in New Issue
Block a user