对指定的URI和请求方式 进行访问限制,使用过程如下: 1. 在页面上配置指定uri和ip 阻止访问配置 2. 通过postman 等方式访问指定uri时,会被过滤器拦截,符合阻止访问规则,则拒绝访问 3. zuul 和 gateway 都能拥有相同的功能,但实现方式有所不同。 gateway: 1. 新增限流规则的接口为: /api/gateway/blockList ,请求方式为POST 2. 限流过滤器为 `PreCheckFilter` 3. 配置文件中需要配置: zuihou.webmvc.enabled = false ,使得`GatewayWebConfiguration`类中的WebfluxConfig 配置类生效。 zuul: 1. 新增限流规则的接口为: /api/gate/gateway/blockList ,请求方式为POST 2. 限流过滤器为 `ZuulPreCheckFilter` 3. 配置文件中需要配置: zuihou.webmvc.enabled = true ,使得`GatewayWebConfiguration`类中的 WebmvcConfig 配置类生效。 4. zuihou-ui/src/api/BlockList.js 所有的url增加 /gate 的前缀。 如: /gate/gateway/blocklist/page