From 03e97d771df9f9b39dcc827731f3372cb406f581 Mon Sep 17 00:00:00 2001 From: "Claude (owner)" Date: Sat, 6 Jun 2026 16:37:59 +0900 Subject: [PATCH] =?UTF-8?q?docs:=20=EB=A0=88=EA=B1=B0=EC=8B=9C=20ID-only?= =?UTF-8?q?=20URL=20=EB=AC=B8=EC=84=9C/=EC=A3=BC=EC=84=9D=EC=9D=84=20?= =?UTF-8?q?=EC=8B=A4=EC=A0=9C=20=EB=8F=99=EC=9E=91=EC=97=90=20=EB=A7=9E?= =?UTF-8?q?=EA=B2=8C=20=EC=A0=95=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - README: 제거된 /api/video/:videoId/file 안내 삭제, /file/video/:videoId 만 레거시 주소로 남기고 전역 유일할 때만 200 임을 명시 - public.ts 썸네일 fallback 주석을 "전역 첫 매치" → "전역에서 유일한 경우만" Co-Authored-By: Claude Opus 4 --- README.md | 2 +- src/routes/public.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bde8e37..626b75f 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ data/ - `/folder/:topName/:subName` — 2단계 폴더 (영상만 표시, 더 깊이 들어갈 수 없음) - `/video/:topName/:videoId` 또는 `/video/:topName/:subName/:videoId` — 외부 공유용 짧은 URL. 경로의 폴더 부분이 영상 위치와 일치할 때만 200. - `/api/video/:topName[/:subName]/:videoId` — 실제 파일 스트림 (정규). 재생 페이지와 동일한 폴더 경로 규칙으로, 경로가 영상 위치와 일치할 때만 200. `?edited=0` 으로 원본 강제. -- `/file/video/:videoId`, `/api/video/:videoId/file` — ID 기반 파일 스트림 (레거시·외부 공유 호환). +- `/file/video/:videoId` — ID 기반 파일 스트림 (레거시·외부 공유 호환). ID 가 전역에서 유일할 때만 200, 여러 폴더에 같은 ID 가 있으면 404. 관리자(`/op`): - `/op` — 폴더 목록 (로그인 필요) diff --git a/src/routes/public.ts b/src/routes/public.ts index 4126c60..7b46d8c 100644 --- a/src/routes/public.ts +++ b/src/routes/public.ts @@ -182,7 +182,7 @@ const thumbByPathHandler: RequestHandler = (req, res, next) => { publicRouter.get('/file/video/:topName/:videoId/thumb', thumbByPathHandler) publicRouter.get('/file/video/:topName/:subName/:videoId/thumb', thumbByPathHandler) -/** ID-only 레거시 썸네일 fallback (전역 첫 매치). */ +/** ID-only 레거시 썸네일 fallback (전역에서 유일한 경우만, 중복이면 404). */ const thumbHandler: RequestHandler = (req, res, next) => { const video = getVideoByIdGlobal(req.params.videoId) if (!video) {