Skip to content

Commit 81782b7

Browse files
committed
Fix: Add Access-Control-Allow-Credentials header for handshaking response
1 parent 53149a0 commit 81782b7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/com/vietle/mychatapi/config/CustomHandshakeInterceptor.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ public void afterHandshake(
2424
ServerHttpRequest request,
2525
ServerHttpResponse response,
2626
WebSocketHandler wsHandler,
27-
Exception exception) {
28-
// After handshake logic, if needed
27+
Exception exception
28+
) {
29+
response.getHeaders().add("Access-Control-Allow-Credentials", "true");
2930
}
3031
}

0 commit comments

Comments
 (0)