Skip to content

Commit 0489b20

Browse files
committed
fix: CORS preflight OPTIONS 요청 허용
1 parent a87b648 commit 0489b20

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/be/dash/dashserver/api/support/PermissionInterceptor.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ public class PermissionInterceptor implements HandlerInterceptor {
2828

2929
@Override
3030
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) {
31+
// CORS preflight 요청은 통과
32+
if ("OPTIONS".equalsIgnoreCase(request.getMethod())) {
33+
return true;
34+
}
3135
if (handler instanceof ResourceHttpRequestHandler)
3236
return true;
3337
HandlerMethod method = (HandlerMethod) handler;

0 commit comments

Comments
 (0)