Open
Conversation
- user/list 접근시 Cookie 헤더를 읽어서 logined=true가 있을 경우에 사용자 목록을 출력한다. - 만약, logined=true가 아니라면 로그인 페이지로 이동한다.
html을 찾는 로직이 중복되어, 메소드로 추출했습니다.
Dae-Hwa
reviewed
Aug 26, 2021
| Map<String, String> parameters = request.getRequestMessage().getHeader().getAttributes(); | ||
| String Cookie = parameters.getOrDefault("Cookie", "empty"); | ||
|
|
||
| if (loginRequired(path)) { |
Collaborator
There was a problem hiding this comment.
접근은 괜찮은 것 같아요
그런데 너무 미래를 위한 코드가 아닐까 하는 생각도 한 편으로 드네요
| } | ||
|
|
||
| File htmlFile = new File("./webapp" + path); | ||
| private String requestController(Request request) throws IOException { |
Collaborator
There was a problem hiding this comment.
이거도 좋네요
나중에 클래스로 분리도 가능할 것 같네요
3 tasks
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.
user/list 접근시 Cookie 헤더를 읽어서
logined=true가 있을 경우에 사용자 목록을 출력한다.만약,
logined=true가 아니라면 로그인 페이지로 이동한다.html 파일을 찾아주는 mapper method 정의
RequestHandler 구조 리팩토링