diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/IPValidatorUtileria.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/IPValidatorUtileria.java index 698456536..f35115aa7 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/utilerias/IPValidatorUtileria.java +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/IPValidatorUtileria.java @@ -73,17 +73,6 @@ public class IPValidatorUtileria { return null; } - public static boolean ipExternoException(String ipServidor) { - if (ipServidor.equals(getIpExternalAWS())) { - log.info(" IP capturado: " + getIpExternalAWS()); - log.info(" IP: " + ipServidor); - - return true; - } else { - return false; - } - } - public static void main(String[] args) { System.out.println("Current IP address : " + IPValidatorUtileria.getIp()); System.out.println("Current IP address AWS: " + IPValidatorUtileria.getIpExternalAWS()); diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/MyAppInit.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/MyAppInit.java index 7e69ba123..9b3b27e82 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/utilerias/MyAppInit.java +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/MyAppInit.java @@ -74,7 +74,17 @@ public class MyAppInit implements org.zkoss.zk.ui.util.WebAppInit { return false; } - return (IPValidatorUtileria.ipExternoException(ipConstante)); + String ipExternalAWS = IPValidatorUtileria.getIpExternalAWS(); + + if (ipConstante.equals(IPValidatorUtileria.getIpExternalAWS())) { + log.info(" IP capturado: " + ipExternalAWS); + log.info(" IP: " + ipConstante); + + return true; + } else { + return false; + } + } private Integer[] horaExecucion() {