Commit 2a70fe92 by zhangxingmin

push

parent bf91a336
......@@ -52,6 +52,13 @@ public class JwtAuthenticationFilter extends OncePerRequestFilter {
HttpServletResponse response,
FilterChain filterChain) throws ServletException, IOException {
String requestUri = request.getRequestURI();
// 放行 WebSocket 握手请求(必须加!)
if (requestUri.startsWith("/communication/api/ws/")) {
filterChain.doFilter(request, response);
return;
}
// 1. 从HTTP请求中解析JWT令牌(通常从Authorization头获取)
String token = resolveToken(request);
log.info("从HTTP请求中解析JWT令牌(通常从Authorization头获取):{}",token);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment