fix localhost

Signed-off-by: Peter Siegmund <developer@mars3142.org>
This commit is contained in:
2024-10-13 01:25:04 +02:00
parent deb68c0dea
commit a62974e4b3

View File

@@ -34,7 +34,7 @@ public class TimeZoneServiceImpl implements TimeZoneService {
@Cacheable(value = "externalIp", key = "{#ip}") @Cacheable(value = "externalIp", key = "{#ip}")
public String getExternalIp(String ip) { public String getExternalIp(String ip) {
var result = ip; var result = ip;
if (ip.equals("127.0.0.1")) { if (ip.equals("127.0.0.1") || ip.equals("0:0:0:0:0:0:0:1")) {
val response = restClient val response = restClient
.get() .get()
.uri("https://api.ipify.org?format=json") .uri("https://api.ipify.org?format=json")