小程序端验签response编码问题

This commit is contained in:
pserimal
2023-06-21 17:20:19 +08:00
parent a3893c4cd3
commit 126cb29f18

View File

@@ -112,6 +112,7 @@ public class SignValidateFilter implements Filter {
// 前后端验签不等 // 前后端验签不等
if (!newSign.equals(sign)) { if (!newSign.equals(sign)) {
response.setStatus(HttpStatus.OK.value()); response.setStatus(HttpStatus.OK.value());
response.setContentType("application/json;charset=UTF-8");
response.getWriter().write(JSON.toJSONString(ResponseResult.fail(ErrorCodeEnum.SIGN_FAIL))); response.getWriter().write(JSON.toJSONString(ResponseResult.fail(ErrorCodeEnum.SIGN_FAIL)));
return; return;
} }