Skip to content

Commit

Permalink
[feat] interceptor에서 OPTIONS 확인 로직 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
sohyundoh committed Sep 27, 2024
1 parent b7027e4 commit 34a4539
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

import static org.springframework.web.servlet.HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE;

Expand All @@ -32,7 +33,7 @@ public class MoimAuthInterceptor implements HandlerInterceptor {

@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) {
if (handler instanceof ResourceHttpRequestHandler) {
if (handler instanceof ResourceHttpRequestHandler || Objects.equals(request.getMethod(), "OPTIONS")) {
return true;
}
HandlerMethod method = (HandlerMethod) handler;
Expand Down

0 comments on commit 34a4539

Please sign in to comment.