The embedded implementation in soul is :org.dromara.soul.web.forwarde.ForwardedRemoteAddressResolver
。
You need to config X-Forwarded-For
in nginx
first to get correct IP address and host.
org.dromara.soul.plugin.api.RemoteAddressResolver
.public interface RemoteAddressResolver { /** * Resolve inet socket address. * * @param exchange the exchange * @return the inet socket address */ default InetSocketAddress resolve(ServerWebExchange exchange) { return exchange.getRequest().getRemoteAddress(); } }
@Bean public SignService a() { return new A }