-
Notifications
You must be signed in to change notification settings - Fork 0
fix: CORS 제약 조건을 완화 #10
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
Changes from all commits
Commits
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
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.
[p5]
"local.dev.pycon.kr"로 입력하면 local과 dev가 합쳐진 "local.dev.pycon.kr" 도메인이 될 것 같은데, 저는 "local.pycon.kr"과 "dev.pycon.kr" 도메인이 따로 있다고 알고 있었어서 코멘트 남겨봅니다!
만약 제가 잘못 알았거나 local.dev.pycon.kr을 의도하신 게 맞다면 패스해주심 감사하겠습니다:)
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.
넹 의도한 것이 맞슴다, 로컬에서 프론트엔드 dev 서버를 돌릴 시 모든 기능을 전부 테스트하려면
https://local.dev.pycon.kr도메인을 사용해야 해요! (프론트엔드에 그렇게 정의해뒀어요ㅎㅎ)이렇게 하는 이유는, python-korea-payment 프로젝트에서 쿠키가 아래의 속성을 가지거든요.
secure=truedomain=pycon.kr(스테이징은dev.pycon.kr)이때, 프론트에서 Django의 CSRF 토큰을 위해 스테이징 cookie를 접근해야 했는데요, 프론트는 아래 조건에서만 쿠키에 접근할 수 있었어요.
https여야 한다. (secure=true로 인해)dev.pycon.kr하위의 도메인이어야 한다. (domain을 지정해줬으므로)그래서 로컬에서 프론트엔드 dev 서버를 띄울때 기존 PyCon의 도메인들과 겹치지 않으면서 로컬에서
/etc/hosts파일에 등록해서 사용할 수 있는 안전한 도메인을 선정하다보니https://local.dev.pycon.kr가 나온 것입니다!그런데 이렇게 프론트엔드 dev 서버를 띄우니 https://rest-api.dev.pycon.kr 로 요청을 보내려 하니 CORS가 뜨더라고요 🫠
그래서 요기에 추가해주는 겁니다ㅎㅎ