feat: cors 설정
This commit is contained in:
parent
4104eb89a8
commit
7e32f9ac39
@ -37,5 +37,10 @@ public class WebConfiguration implements WebMvcConfigurer {
|
|||||||
registry.addResourceHandler("/img/**").addResourceLocations("classpath:/static/assets/img/");
|
registry.addResourceHandler("/img/**").addResourceLocations("classpath:/static/assets/img/");
|
||||||
registry.addResourceHandler("/*.html**").addResourceLocations("classpath:/static/");
|
registry.addResourceHandler("/*.html**").addResourceLocations("classpath:/static/");
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public void addInterceptors(InterceptorRegistry registry) {
|
||||||
|
registry.addInterceptor(jwtInterceptor)
|
||||||
|
.addPathPatterns("/**") // 모든 경로에 대해 인터셉터 적용
|
||||||
|
.excludePathPatterns("/auth/**", "/board/**", "/user/**","/lecture/**","/qna/**"); // 인증 없이 접근 가능한 경로 설정
|
||||||
|
}
|
||||||
}
|
}
|
@ -30,6 +30,13 @@ public class Controller {
|
|||||||
String roomName = params.get("roomName");
|
String roomName = params.get("roomName");
|
||||||
String participantName = params.get("participantName");
|
String participantName = params.get("participantName");
|
||||||
|
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
|
||||||
if (roomName == null || participantName == null) {
|
if (roomName == null || participantName == null) {
|
||||||
return ResponseEntity.badRequest().body(Map.of("errorMessage", "roomName and participantName are required"));
|
return ResponseEntity.badRequest().body(Map.of("errorMessage", "roomName and participantName are required"));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user