강의계획서 링크를 libproxy 대신 자체 프록시로 제공#527
Merged
Merged
Conversation
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.
배경
sugang.snu.ac.kr 강의계획서 페이지는 Referer가
*.snu.ac.kr인 요청만 허용하고, 그 외에는 메인 페이지로 리다이렉트합니다. 지금까지는 libproxy를 경유시켜 이 제약을 우회하는 임시 해결책을 사용해 왔는데, 이 우회가 더 이상 동작하지 않아 프록시를 직접 운영하는 방식으로 바꿉니다. Referer 체크는 페이지뿐 아니라 탭 내용을 불러오는 ajax 엔드포인트에도 적용되고 브라우저는 Referer를 직접 설정할 수 없으므로, 서버측 프록시가 필요합니다.변경사항
GET /v1/course_books/official의proxyUrl이 libproxy 대신snutt-proxy.wafflestudio.com을 가리키도록 변경합니다./sugang/cc/...)를 사용하므로, 기존처럼 URL을 브라우저에서 열면 페이지의 정적 리소스와 ajax 호출까지 모두 프록시를 통해 동작합니다.url필드도 같은 값을 반환하므로 클라이언트 수정 없이 동작합니다.참고