修复验证码异常时network面板的中文会出现乱码问题

zmy
RuoYi 2020-07-31 15:32:54 +08:00
parent 56ea7c9caf
commit c0251e5cda
1 changed files with 1 additions and 0 deletions

View File

@ -59,6 +59,7 @@ public class ValidateCodeFilter extends AbstractGatewayFilterFactory<Object>
catch (Exception e)
{
ServerHttpResponse response = exchange.getResponse();
response.getHeaders().add("Content-Type", "application/json;charset=UTF-8");
return exchange.getResponse().writeWith(
Mono.just(response.bufferFactory().wrap(JSON.toJSONBytes(AjaxResult.error(e.getMessage())))));
}