We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c88bfc5 commit 03c3ec1Copy full SHA for 03c3ec1
spring-web/src/main/java/org/springframework/http/server/ServletServerHttpRequest.java
@@ -220,7 +220,9 @@ public InetSocketAddress getLocalAddress() {
220
221
@Override
222
public InetSocketAddress getRemoteAddress() {
223
- return new InetSocketAddress(this.servletRequest.getRemoteAddr(), this.servletRequest.getRemotePort());
+ String addressOrHost = this.servletRequest.getRemoteAddr();
224
+ addressOrHost = (addressOrHost != null ? addressOrHost : this.servletRequest.getRemoteHost());
225
+ return new InetSocketAddress(addressOrHost, this.servletRequest.getRemotePort());
226
}
227
228
0 commit comments