fix(config): 존재하지 않는 api.qeploy.com 참조를 qeploy.com 으로 통일 - #81
Open
dldnsgkr wants to merge 2 commits into
Open
Conversation
api.qeploy.com 은 DNS 레코드도 nginx server 블록도 없는 도메인이다. c23f1a3이 EC2 배포 문서를 작성하며 dvely.env.example 에 넣은 뒤로 실제 확인 없이 전파됐고, 2cb5b9d에서 pm2 템플릿으로, 다시 서버 설정으로 복사됐다. 실제 트래픽 경로는 nginx의 qeploy.com server 블록이 /api/ 를 127.0.0.1:8080 으로 프록시하는 것뿐이다. api 서브도메인은 어디에도 존재한 적이 없다. - deploy/ecosystem.config.js.example: 콜백 URI 2개 - docs/FRONTEND_API_GUIDE.md: previewUrl 예시 2곳 - TaskStatusResponse: Swagger example 1곳 참고로 GITHUB_OAUTH_REDIRECT_URI 와 GITHUB_APP_INSTALLATION_REDIRECT_URI 는 GithubProperties 에 필드로 선언만 돼 있고 코드에서 읽는 곳이 없다. 실제 리다이렉트 주소는 GitHub App/OAuth App 설정에 등록된 Callback URL이 결정한다. 그래도 설정 문서로서 실제 배포 구성과 어긋나 있으면 다음 사람이 그대로 믿고 쓰므로 맞춘다. 서버(/var/www/dvely/backend/ecosystem.config.js)에도 동일하게 반영하고 pm2 startOrRestart --update-env 로 재시작해 확인했다. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
UriComponentsBuilder는 build() 뒤에 encode()를 붙이지 않으면 쿼리 값을 날것 그대로 이어 붙인다. scope가 "user:email read:user" 라 공백이 구분자인데, 인코딩이 빠져 쿼리 문자열에 raw 공백이 들어간 RFC 3986 위반 URL이 생성되고 있었다. https://github.com/login/oauth/authorize?client_id=...&scope=user:email read:user&state=... ^ 공백 브라우저는 알아서 %20으로 보정해 보내기 때문에 수동 로그인으로는 드러나지 않는다. 반면 URL 파서를 쓰는 HTTP 클라이언트는 그대로 거부한다. 실제로 배포 검증 중 curl이 "URL rejected: Malformed input to a URL function" 으로 실패해 발견했다. 같은 패턴이 세 곳에 있어 모두 encode()를 추가했다: - GithubOAuthClient.getAuthorizeUrl (scope에 공백이 있어 실제로 깨지던 곳) - GithubAppClient.getInstallationUrl - GithubAppClient.getReauthorizeUrl 뒤 두 곳은 지금은 state(JWT)만 실려 문제가 없지만, 값 형식이 바뀌면 같은 결함이 재현되므로 함께 맞췄다. 회귀 방지 테스트를 추가했다. URI.create()로 파싱을 검증하는데, raw 공백이 있으면 IllegalArgumentException을 던져 curl이 거부한 것과 같은 조건을 잡는다. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
문제
api.qeploy.com은 존재하지 않는 도메인입니다.c23f1a3(PR #66)이 EC2 배포 문서를 작성하며dvely.env.example에 넣은 값인데, 실제 인프라에 존재하는지 확인되지 않은 채 전파됐습니다.2cb5b9d(PR #80)에서 제가 pm2 템플릿으로 그대로 옮겼고, 거기서 다시 서버 설정으로 복사됐습니다.실제 트래픽 경로는 nginx의
qeploy.comserver 블록이/api/를127.0.0.1:8080으로 프록시하는 것뿐입니다. 검증됨:수정
deploy/ecosystem.config.js.exampledocs/FRONTEND_API_GUIDE.mdpreviewUrl예시 2곳TaskStatusResponse.java저장소 전체에
api.qeploy.com잔여 참조가 없음을 확인했습니다.참고: 이 값들은 코드에서 읽히지 않습니다
GithubProperties에redirectUri/installationRedirectUri필드가 선언만 돼 있고 소비하는 곳이 없습니다. 인가 URL 생성 시에도redirect_uri파라미터를 붙이지 않아, 실제 리다이렉트 주소는 GitHub App/OAuth App 설정에 등록된 Callback URL이 결정합니다.그래도 설정 문서로서 실제 배포 구성과 어긋나 있으면 다음 사람이 그대로 믿고 쓰게 되므로 맞췄습니다.
서버 반영 완료
/var/www/dvely/backend/ecosystem.config.js에도 동일 적용 후pm2 startOrRestart --update-env로 재시작했습니다. 나머지 17개 값은 변경 없음을 해시 대조로 확인했고, healthUP입니다.GitHub OAuth App / GitHub App 설정의 Callback URL이
api.qeploy.com으로 등록돼 있다면 반드시qeploy.com으로 바꿔야 합니다. 그쪽이 실제 동작을 결정하므로, 안 바꾸면 로그인 시 존재하지 않는 도메인으로 리다이렉트됩니다.🤖 Generated with Claude Code