-
Notifications
You must be signed in to change notification settings - Fork 4
배포된 백엔드 api와 연결 #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
배포된 백엔드 api와 연결 #47
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
eebdd61
feat: upload fasta버튼 텍스트 수정 및 .fna파일도 지원
cnvxlns 400e6a1
feat: 목데이터 제거 및 배포된 api와의 연결
cnvxlns e4881f0
feat: 목데이터 제거 및 배포된 api와의 연결
cnvxlns 4f0e813
chore: 경고메시지 한국어로 통일
cnvxlns f6a60ec
feat: same-origin API 프록시 기본화
cnvxlns b5d7dc9
feat: same-origin API 프록시 복원 및 시퀀스 입력 검증 강화
cnvxlns 24e1701
fix: inject BACKEND_URL from GitHub Secrets with branch-based prod/st…
cnvxlns 9082496
fix: route BACKEND_URL by branch (main/master=prod, others=staging) w…
cnvxlns 59ca8bd
chore: rerun ci
cnvxlns f0cdd66
chore: rerun ci
cnvxlns 98a1630
chore: ci 파일 복원
cnvxlns a87acde
fix: inject BACKEND_URL for build
cnvxlns 74df95a
fix: inject BACKEND_URL via secrets
cnvxlns 5ae469c
fix: allow fork PR builds without secrets
cnvxlns File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,11 @@ | ||
| # Copy this file to .env.local and set variables as needed. | ||
| # If unset, Next.js rewrites fall back to http://127.0.0.1:8000. | ||
| # | ||
| # Backend origin used by Next.js rewrite proxy. | ||
| # - Local development default: http://127.0.0.1:8000 | ||
| # - Production: BACKEND_URL must be explicitly set. | ||
| BACKEND_URL= | ||
| # | ||
| # Frontend axios base URL. | ||
| # Keep this unset to use "/api" (same-origin via Next.js rewrite). | ||
| # Set only when you intentionally bypass the rewrite proxy. | ||
| NEXT_PUBLIC_API_BASE_URL= |
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
This file was deleted.
Oops, something went wrong.
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,28 @@ | ||
| import type { NextConfig } from "next"; | ||
|
|
||
| const nextConfig: NextConfig = { | ||
| // ... 기타 설정들 ... | ||
| const DEFAULT_LOCAL_BACKEND_URL = "http://127.0.0.1:8000"; | ||
| const configuredBackendUrl = process.env.BACKEND_URL?.trim(); | ||
|
|
||
| if (!configuredBackendUrl && process.env.NODE_ENV === "production") { | ||
| throw new Error( | ||
| "BACKEND_URL must be set in production. Set BACKEND_URL to your backend origin.", | ||
| ); | ||
| } | ||
|
|
||
| async rewrites() { | ||
| // BACKEND_URL 값이 없으면 로컬(8000)로 연결 | ||
| const backendUrl = process.env.BACKEND_URL || "http://127.0.0.1:8000"; | ||
| const backendUrl = (configuredBackendUrl || DEFAULT_LOCAL_BACKEND_URL).replace( | ||
| /\/+$/, | ||
| "", | ||
| ); | ||
|
|
||
| return [ | ||
| { | ||
| source: "/api/v1/:path*", | ||
| destination: `${backendUrl}/:path*`, // 여기를 변수로 변경 | ||
| }, | ||
| ]; | ||
| }, | ||
| const nextConfig: NextConfig = { | ||
| async rewrites() { | ||
| return [ | ||
| { | ||
| source: "/api/:path*", | ||
| destination: `${backendUrl}/:path*`, | ||
| }, | ||
| ]; | ||
| }, | ||
| }; | ||
|
|
||
| export default nextConfig; |
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
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기서 사용자에게 노출되는 에러 메시지가 영어로 표시되고 있는데, 같은 파일의 다른 검증/경고 메시지는 한국어로 제공되고 있습니다. 사용자 경험 일관성을 위해 한국어 메시지로 통일하거나(또는 i18n/상수로 분리) 기존 메시지 스타일에 맞춰 주세요.