Skip to content

Commit

Permalink
fix: 쿠키 인증 버그 수정 (#235)
Browse files Browse the repository at this point in the history
  • Loading branch information
Arachneee authored Aug 7, 2024
1 parent 7bd9420 commit 79bd41c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpMethod;
import org.springframework.web.servlet.HandlerInterceptor;
import server.haengdong.application.AuthService;
import server.haengdong.exception.AuthenticationException;
Expand All @@ -23,8 +24,8 @@ public AdminInterceptor(AuthService authService, AuthenticationExtractor authent
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) {
log.trace("login request = {}", request.getRequestURI());

String method = request.getMethod();
if (method.equals("GET")) {
HttpMethod method = HttpMethod.valueOf(request.getMethod());
if (HttpMethod.GET.equals(method) || HttpMethod.OPTIONS.equals(method)) {
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion server/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ security:
expire-length: 604800 # 1주일

cookie:
http-only: true
http-only: false
secure: false
path: /
max-age: 7D
Expand Down

0 comments on commit 79bd41c

Please sign in to comment.