Skip to content

Commit

Permalink
Merge pull request #23 from ChoiWonYu/feature/auth-detail
Browse files Browse the repository at this point in the history
feat: allow preflight request
  • Loading branch information
ChoiWonYu authored Aug 21, 2023
2 parents 680a0fb + a1bf7da commit 21d5d83
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.util.PatternMatchUtils;
import org.springframework.web.cors.CorsUtils;

@RequiredArgsConstructor
@Slf4j
Expand All @@ -32,7 +33,7 @@ public void doFilter(ServletRequest request, ServletResponse response, FilterCha
HttpServletRequest httpServletRequest = (HttpServletRequest) request;
HttpServletResponse httpServletResponse = (HttpServletResponse) response;

if(checkWhiteList(httpServletRequest.getRequestURI())){
if(checkWhiteList(httpServletRequest.getRequestURI())||CorsUtils.isPreFlightRequest(httpServletRequest)){
chain.doFilter(request,response);
return;
}
Expand Down

0 comments on commit 21d5d83

Please sign in to comment.