Add host helper

This commit is contained in:
Christopher Schnick 2023-01-10 08:23:28 +01:00
parent 8036b866ad
commit fe52f10ca8

View file

@ -0,0 +1,18 @@
package io.xpipe.extension.util;
import java.util.Locale;
public class HostHelper {
public static boolean isLocalHost(String host) {
if (host.equals("127.0.0.1")) {
return true;
}
if (host.toLowerCase(Locale.ROOT).equals("localhost")) {
return true;
}
return false;
}
}