mirror of
https://gitee.com/y_project/RuoYi-Cloud.git
synced 2026-01-26 03:44:57 +08:00
修复网关黑名单过滤器中文乱码问题
This commit is contained in:
@@ -28,8 +28,9 @@ public class BlackListUrlFilter extends AbstractGatewayFilterFactory<BlackListUr
|
|||||||
if (config.matchBlacklist(url))
|
if (config.matchBlacklist(url))
|
||||||
{
|
{
|
||||||
ServerHttpResponse response = exchange.getResponse();
|
ServerHttpResponse response = exchange.getResponse();
|
||||||
|
response.getHeaders().add("Content-Type", "application/json;charset=UTF-8");
|
||||||
return exchange.getResponse().writeWith(
|
return exchange.getResponse().writeWith(
|
||||||
Mono.just(response.bufferFactory().wrap(JSON.toJSONBytes(AjaxResult.error("服务拒绝访问")))));
|
Mono.just(response.bufferFactory().wrap(JSON.toJSONBytes(AjaxResult.error("请求地址不允许访问")))));
|
||||||
}
|
}
|
||||||
|
|
||||||
return chain.filter(exchange);
|
return chain.filter(exchange);
|
||||||
|
|||||||
Reference in New Issue
Block a user