261102_02_ENH: 공용 인증 쿠키 도메인 적용 조건 수정 및 외부 링크 인증 탭별 분리
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
import { cookies } from "next/headers";
|
||||
import { errorToResponse } from "@kri/common/http";
|
||||
import { createServerApi } from "@/lib/http-server";
|
||||
import { createServerApi, getServerAccessToken } from "@/lib/http-server";
|
||||
import {
|
||||
bookmarkUpstreamPath,
|
||||
isBookmarkCreatePath,
|
||||
@@ -9,7 +8,6 @@ import {
|
||||
isBookmarkListPath,
|
||||
} from "@/lib/project-proxy-policy";
|
||||
import { isBookmarkPage, readBookmarkSaveRequest } from "@/types/bookmark";
|
||||
import { CookieKeys } from "@/store/cookie/cookie-keys";
|
||||
import type { RouteContext } from "@/types/common";
|
||||
|
||||
const notFound = () =>
|
||||
@@ -19,7 +17,7 @@ const unauthorized = () =>
|
||||
const badRequest = () =>
|
||||
NextResponse.json({ message: "북마크 저장 내용을 확인해 주세요." }, { status: 400 });
|
||||
const noStore = { headers: { "Cache-Control": "no-store" } };
|
||||
const loggedIn = async () => !!(await cookies()).get(CookieKeys.AuthToken)?.value;
|
||||
const loggedIn = async () => !!(await getServerAccessToken());
|
||||
|
||||
export async function GET(request: NextRequest, context: RouteContext) {
|
||||
const { slug = [] } = await context.params;
|
||||
|
||||
Reference in New Issue
Block a user