public class ForwardedRemoteAddressResolver
extends java.lang.Object
implements org.apache.shenyu.plugin.api.RemoteAddressResolver
RemoteAddressResolver and
ServerHttpRequest.getRemoteAddress(). Use the static constructor methods which
meets your security requirements.| 限定符和类型 | 字段和说明 |
|---|---|
static java.lang.String |
X_FORWARDED_FOR
Forwarded-For header name.
|
| 构造器和说明 |
|---|
ForwardedRemoteAddressResolver(int maxTrustedIndex)
Instantiates a new Forwarded remote address resolver.
|
| 限定符和类型 | 方法和说明 |
|---|---|
static ForwardedRemoteAddressResolver |
maxTrustedIndex(int maxTrustedIndex)
Max trusted index forwarded remote address resolver.
|
java.net.InetSocketAddress |
resolve(org.springframework.web.server.ServerWebExchange exchange) |
static ForwardedRemoteAddressResolver |
trustAll()
Trust all forwarded remote address resolver.
|
public static final java.lang.String X_FORWARDED_FOR
public ForwardedRemoteAddressResolver(int maxTrustedIndex)
maxTrustedIndex - the max trusted indexpublic static ForwardedRemoteAddressResolver trustAll()
public static ForwardedRemoteAddressResolver maxTrustedIndex(int maxTrustedIndex)
maxTrustedIndex - the max trusted indexpublic java.net.InetSocketAddress resolve(org.springframework.web.server.ServerWebExchange exchange)
resolve 在接口中 org.apache.shenyu.plugin.api.RemoteAddressResolverCopyright © 2026 The Apache Software Foundation. All rights reserved.