feat : 프리뷰 열람 권한 발급(access) 연동 - #30
Merged
Merged
Conversation
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
배경
백엔드가 프리뷰 게이트웨이 접근을 세션 소유자에게 묶었습니다(Dvely/Dvely_springboot#104, Issue Dvely/Dvely_springboot#77). 이제 게이트웨이는 URL만으로 열리지 않고, iframe 표시 직전에 열람 권한을 발급받아 소유권 쿠키를 받아야 합니다. 쿠키 없이 프리뷰 URL을 열면 401입니다.
변경 내용
POST /api/v1/preview-sessions/{sessionId}/access호출 추가 (postPreviewSessionAccess+usePreviewAccessQuery)ACTIVE가 되면 자동으로 1회 발급받고, 응답의previewUrl을 iframesrc로 사용합니다.HttpOnly+Set-Cookie로 내려오며 axios가 이미withCredentials: true라 브라우저가 자동 보관합니다. FE가 값을 다룰 일은 없습니다.accessToken이 회전되어 이전에 받은 주소(세션 조회/작업 응답의previewUrl포함)는 즉시 404가 됩니다. 그래서previewUrl만 사용하고,frameKey를 올려 재발급 + iframe 리마운트로 동작합니다.getPreviewProxyPath제거 (FE가 프록시 URL을 직접 조립하면 안 됩니다).배포 순서
백엔드 Dvely/Dvely_springboot#104가 먼저(또는 함께) 배포되어야 합니다 — access 엔드포인트가 없으면 프리뷰가 열리지 않습니다. 현재 운영 프리뷰는 Docker 권한 문제로 이미 내려가 있는 상태라 순서에 따른 회귀는 없습니다.
검증
npm run typecheck통과npm run build통과 (기존 청크 사이즈 경고만 존재)_conversationId미사용 에러는 본 PR 범위 밖)