Merge branch 'main' into iipbs/sn/dev
This commit is contained in:
@@ -60,10 +60,13 @@ async function handler(
|
||||
[AUTH_USER_ID]: userId,
|
||||
});
|
||||
|
||||
|
||||
|
||||
if (refreshToken) {
|
||||
cookieStore.set(REFRESH_TOKEN, refreshToken, {
|
||||
httpOnly: true,
|
||||
sameSite: "lax",
|
||||
// domain: domain,
|
||||
path: "/",
|
||||
});
|
||||
}
|
||||
@@ -83,6 +86,7 @@ async function handler(
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export async function POST(
|
||||
request: Request,
|
||||
props: { params: Promise<{ url: string[] }> },
|
||||
|
||||
@@ -10,6 +10,8 @@ export interface ZipSearchParams extends PageableParams {
|
||||
roadNm?: string; // 도로명
|
||||
stdgNm?: string; // 법정동명
|
||||
dongNm?: string; // 행정동명
|
||||
bldgNoMno?: number | null; // 빌딩본번
|
||||
bldgNoSno?: number | null; // 빌딩딩부번
|
||||
lotnoMno?: number | null; // 지번본번
|
||||
lotnoSno?: number | null; // 지번부번
|
||||
}
|
||||
@@ -21,6 +23,8 @@ export interface Zip {
|
||||
sggNm: string;
|
||||
emdNm: string;
|
||||
roadNm: string;
|
||||
bldgNoMno: number;
|
||||
bldgNoSno: number;
|
||||
lotnoMno: number;
|
||||
lotnoSno: number;
|
||||
lotno: string;
|
||||
|
||||
@@ -39,8 +39,8 @@ function ZipSearchDialog({ onSelectAddress }: ZipSearchDialogProps) {
|
||||
});
|
||||
const [searchQuery, setSearchQuery] = useState<ZipSearchParams>({
|
||||
roadNm: "",
|
||||
lotnoMno: null,
|
||||
lotnoSno: null,
|
||||
bldgNoMno: null,
|
||||
bldgNoSno: null,
|
||||
});
|
||||
const hasFetchedOnce = useRef(false);
|
||||
|
||||
@@ -156,17 +156,17 @@ function ZipSearchDialog({ onSelectAddress }: ZipSearchDialogProps) {
|
||||
</div>
|
||||
|
||||
<div className="flex flex-col">
|
||||
<Label className="mb-1 text-base">지번본번</Label>
|
||||
<Label className="mb-1 text-base">건물본번</Label>
|
||||
<Input
|
||||
type="number"
|
||||
value={searchQuery.lotnoMno ?? ""}
|
||||
value={searchQuery.bldgNoMno ?? ""}
|
||||
onChange={(e) => {
|
||||
const value = e.target.value
|
||||
? parseInt(e.target.value)
|
||||
: null;
|
||||
setSearchQuery({
|
||||
...searchQuery,
|
||||
lotnoMno: value,
|
||||
bldgNoMno: value,
|
||||
});
|
||||
}}
|
||||
placeholder="예: 123"
|
||||
@@ -175,17 +175,17 @@ function ZipSearchDialog({ onSelectAddress }: ZipSearchDialogProps) {
|
||||
</div>
|
||||
|
||||
<div className="flex flex-col">
|
||||
<Label className="mb-1 text-base">지번부번</Label>
|
||||
<Label className="mb-1 text-base">건물부번</Label>
|
||||
<Input
|
||||
type="number"
|
||||
value={searchQuery.lotnoSno ?? ""}
|
||||
value={searchQuery.bldgNoSno ?? ""}
|
||||
onChange={(e) => {
|
||||
const value = e.target.value
|
||||
? parseInt(e.target.value)
|
||||
: null;
|
||||
setSearchQuery({
|
||||
...searchQuery,
|
||||
lotnoSno: value,
|
||||
bldgNoSno: value,
|
||||
});
|
||||
}}
|
||||
placeholder="예: 45"
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
"use client";
|
||||
import React from "react";
|
||||
|
||||
export default function TestPage() {
|
||||
|
||||
const handleFindUser = () => {
|
||||
fetch('/operation-service/api/v1/fclt/flow/1/10/2024', {
|
||||
method: "GET",
|
||||
}).then((data) => {
|
||||
console.log(data);
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="text-4xl">
|
||||
<span>여기를 click</span>
|
||||
<button onClick={handleFindUser} className="bg-blue-500 hover:bg-blue-700 text-white">
|
||||
버튼
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
+11
-10
@@ -36,15 +36,15 @@ function rewriteWith(url: string, req: NextRequest, withAuth = false): NextRespo
|
||||
|
||||
const headers = withAuth ? buildAuthHeaders(req) : new Headers(req.headers);
|
||||
|
||||
if (url.indexOf("/operation-service") !== -1) {
|
||||
// x-forwarded- 로 시작하는 헤더의 첫 번째 값만 남김
|
||||
for (const [key, value] of headers.entries()) {
|
||||
if (key.startsWith('x-forwarded-') && value.includes(',')) {
|
||||
const first = (value?.split(',')[0] || '').trim();
|
||||
headers.set(key, first);
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (url.indexOf("/operation-service") !== -1) {
|
||||
// // x-forwarded- 로 시작하는 헤더의 첫 번째 값만 남김
|
||||
// for (const [key, value] of headers.entries()) {
|
||||
// if (key.startsWith('x-forwarded-') && value.includes(',')) {
|
||||
// const first = (value?.split(',')[0] || '').trim();
|
||||
// headers.set(key, first);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
return NextResponse.rewrite(new URL(url), { headers });
|
||||
}
|
||||
@@ -102,7 +102,8 @@ export function middleware(req: NextRequest) {
|
||||
}
|
||||
|
||||
console.log(`[Middleware] Rewriting from '/geoserver' path to: ${newUrl}`);
|
||||
return NextResponse.rewrite(new URL(newUrl));
|
||||
const rewriteRequest = rewriteWith(newUrl, req, true);
|
||||
return rewriteRequest;
|
||||
}
|
||||
|
||||
if (pathname.startsWith("/sewerage-service")) {
|
||||
|
||||
@@ -99,7 +99,8 @@ export function middleware(req: NextRequest) {
|
||||
}
|
||||
|
||||
console.log(`[Middleware] Rewriting from '/geoserver' path to: ${newUrl}`);
|
||||
return NextResponse.rewrite(new URL(newUrl));
|
||||
const rewriteRequest = rewriteWith(newUrl, req, true);
|
||||
return rewriteRequest;
|
||||
}
|
||||
|
||||
if (pathname.startsWith("/attach-service")
|
||||
|
||||
@@ -122,7 +122,8 @@ export function middleware(req: NextRequest) {
|
||||
}
|
||||
|
||||
//console.log(`[Middleware] Rewriting from '/geoserver' path to: ${newUrl}`);
|
||||
return NextResponse.rewrite(new URL(newUrl));
|
||||
const rewriteRequest = rewriteWith(newUrl, req, true);
|
||||
return rewriteRequest;
|
||||
}
|
||||
|
||||
if (pathname.startsWith("/sewerage-service")) {
|
||||
|
||||
Reference in New Issue
Block a user