mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-09-02 18:51:01 +12:00
Add host helper
This commit is contained in:
parent
c4e0932d9e
commit
c23d099d53
1 changed files with 18 additions and 0 deletions
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue