BUGFIX: 子账号信息无法正确导出为excel

This commit is contained in:
2025-08-28 19:22:55 +08:00
parent 933522482b
commit 6441bfbbba
2 changed files with 7 additions and 2 deletions

View File

@@ -74,7 +74,12 @@ public class AuthenticationFilter extends OncePerRequestFilter {
wrappedRequest = new MultiReadHttpServletRequest(httpServletRequest);
wrappedResponse = new MultiReadHttpServletResponse(httpServletResponse);
extracted(wrappedRequest);
filterChain.doFilter(wrappedRequest, wrappedResponse);
// excel导出使用原始response,不对响应做包装
if (requestURI.equals("/api/account/exportAccountsToExcel")) {
filterChain.doFilter(httpServletRequest, httpServletResponse); // 不包装
} else {
filterChain.doFilter(wrappedRequest, wrappedResponse);
}
}
} catch (Exception e) {
SecurityContextHolder.clearContext();