Open
Conversation
OscarKang1
reviewed
Apr 11, 2026
bukyung03
reviewed
Apr 11, 2026
kcleverp
reviewed
Apr 11, 2026
| SignupResponseData, | ||
| } from '../types/auth'; | ||
|
|
||
| const BASE_URL = 'http://localhost:8000/v1'; |
There was a problem hiding this comment.
URL이 코드에 그대로 하드코딩 되어 있습니다.
서버 주소는 유출 시 API 키 정도는 아니지만 해커가 의미 없는 요청을 수십 번 날리는 디도스 공격을 시도하거나,
봇을 돌려 비밀번호가 맞을 떄까지 시도하여 특정 유저의 비밀번호를 알아내는 등 보안 사고가 발생할 수 있습니다
서버 연산 자원과 사용자의 보안을 위해서 env 파일에 URL을 지정하고 API 키처럼 로드해서 사용하는건 어떨까요?
qkrdmsthff
approved these changes
Apr 13, 2026
Collaborator
qkrdmsthff
left a comment
There was a problem hiding this comment.
LGTM 조이 ~ 피드백이 늦었습니다 슬슬 바빠지네요... 다음ㅈ 피드백은 조금 더 정성스레 작성해드릴게요 수고하셨습니다
Comment on lines
+11
to
+22
| const load = async () => { | ||
| setIsLoading(true); | ||
| setError(null); | ||
| try { | ||
| const result = await fetchFn(); | ||
| if (!cancelled) setData(result); | ||
| } catch { | ||
| if (!cancelled) setError('데이터를 불러오는 데 실패했습니다.'); | ||
| } finally { | ||
| if (!cancelled) setIsLoading(false); | ||
| } | ||
| }; |
Collaborator
There was a problem hiding this comment.
새로운 fetchFn 이 들어올 때 이전 데이터가 그대로 남아있으면, UX 측면에서 깜빡이는 현상이 발생할 수 있습니다.
load 함수가 시작될 때, setData(null) 을 호출하여 상태를 초기화해 주면 좋을 것 같네요~
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.
✅ 워크북 체크리스트
✅ 컨벤션 체크리스트
📌 주안점