mirror of https://github.com/halo-dev/halo
#### What type of PR is this? /kind bug /area core /milestone 2.7.x #### What this PR does / why we need it: In some special situations, Halo can not obtain client IP address from request headers and socket address is unresolved, so that `java.lang.NullPointerException: Cannot invoke "java.net.InetAddress.getHostAddress()" because the return value of "java.net.InetSocketAddress.getAddress()" is null` will happen. This PR will resolve the problem by checking `X-Real-IP` header and checking if remote address is unresolved. #### Which issue(s) this PR fixes: Fixes https://github.com/halo-dev/halo/issues/4134 #### Does this PR introduce a user-facing change? ```release-note None ``` |
||
|---|---|---|
| .. | ||
| src | ||
| build.gradle | ||