Skip to content

Commit ab1ebb5

Browse files
authored
Refactor/101 room detail (#116)
* feat: cors 설정 * 웹소켓 * 웹소켓 * 웹소켓 * 웹소켓 * 웹소켓 * 웹소켓
1 parent 129d08f commit ab1ebb5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/main/java/com/oronaminc/join/member/security/SecurityConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
6161
public CorsConfigurationSource corsConfigurationSource() {
6262
CorsConfiguration configuration = new CorsConfiguration();
6363
configuration.setAllowCredentials(true);
64-
configuration.setAllowedOriginPatterns(List.of("*"));
64+
configuration.setAllowedOriginPatterns(List.of("http://localhost:5173"));
6565
configuration.setAllowedMethods(List.of("GET", "POST", "PUT", "DELETE", "OPTIONS"));
6666
configuration.setAllowedHeaders(List.of("*"));
6767

src/main/java/com/oronaminc/join/websocket/api/QuestionWebsocketController.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public QuestionCreateResponse createQuestion(
4343
Principal principal
4444
) {
4545
log.debug("수신한 메시지 = {}", request.content());
46+
log.debug("principal = {}", principal);
4647

4748
MemberDetails memberDetails = (MemberDetails)((Authentication)principal).getPrincipal();
4849
Long memberId = Long.valueOf(memberDetails.getId());

0 commit comments

Comments
 (0)