用户工具

站点工具


light4j:proxy
# handler.yml,使用values.yml配置
enabled: ${handler.enabled:true}
handlers: ${handler.handlers:}
chains: ${handler.chains:}
paths: ${handler.paths:}
# values.yml
handler.handlers:
- com.networknt.openapi.OpenApiHandler@specification
- com.networknt.openapi.JwtVerifyHandler@security
- com.networknt.body.ProxyBodyHandler@body
- com.networknt.openapi.ValidatorHandler@validator
- com.networknt.proxy.LightProxyHandler@proxy
- com.networknt.proxy.ProxyServerInfoHandler@proxyServerInfo
# proxy.yml,配置三方接口地址
hosts: http://localhost:18081,http://localhost:18082,http://localhost:18083
  • ingress-proxy,LightProxyHandler,proxy.yml,通过ProxyHandler.builder()因为后者是final类
GET /server/info,ProxyServerInfoHandler响应{proxy_info}
light4j/proxy.txt · 最后更改: 2021/11/26 11:39 由 admin