request.getRemoteAddr()返回localhost地址为IPV6
request.getRemoteAddr()返回localhost地址为 0:0:0:0:0:0:0:1
希望返回IPv4地址:
修改/etc/hosts (kubuntu)
注释掉 ::1 localhost ip6-localhost ip6-loopback
或者添加 127.0.0.1 localhost
request.getRemoteAddr()返回localhost地址为 0:0:0:0:0:0:0:1
希望返回IPv4地址:
修改/etc/hosts (kubuntu)
注释掉 ::1 localhost ip6-localhost ip6-loopback
或者添加 127.0.0.1 localhost