Changeset 36881


Ignore:
Timestamp:
2022-11-04T13:04:44+13:00 (5 weeks ago)
Author:
anupama
Message:

Removed debugging.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/LibraryServlet.java

    r36879 r36881  
    11131113    }
    11141114
    1115 
    1116     private void debugCheckAgainstRegex() {
    1117    
    1118     // Load the global.properties file, get the tomcat.server.IPregex and check for any of it
    1119     // matching against the local IP
    1120     String tomcatServerIPregex = GlobalProperties.getProperty("tomcat.server.IPregex", "");
    1121    
    1122     logger.info("@@@ tomcatServerIPregex: " + tomcatServerIPregex);
    1123    
    1124     String[] testIPs = {"127.0.0.1", "::1", "0:0:0:0:0:0:0:1", "0:0:0:0:0:0:0:1%3"};
    1125    
    1126     //if(ipOfClient.equals(request.getLocalAddr()) || ipOfClient.equals("127.0.0.1")
    1127     //   || ipOfClient.equals("::1") || ipOfClient.startsWith("0:0:0:0:0:0:0:1")) {
    1128    
    1129     for(String testIP : testIPs) {
    1130         if(testIP.matches(tomcatServerIPregex)) {
    1131         logger.info("testIP " + testIP + " matches regex.");
    1132         } else {
    1133         logger.info("testIP " + testIP + " DOESN'T match regex.");
    1134         }
    1135     }   
    1136     }
    1137    
    11381115   
    11391116    /**
     
    11531130    // if request emanates on same machine as GS server/from local machine, let it go through
    11541131    String ipOfClient = getClientIpAddress(request); //request.getRemoteAddr();
    1155     logger.info("@@@ Request local IP: " + request.getLocalAddr());
    1156     logger.info("@@@ Client/remote IP: " + ipOfClient);
    1157    
    1158     //debugCheckAgainstRegex();
    1159 
    1160     //if(ipOfClient.equals(request.getLocalAddr()) || ipOfClient.equals("127.0.0.1")
    1161     //   || ipOfClient.equals("::1") || ipOfClient.startsWith("0:0:0:0:0:0:0:1")) {
    1162     //    return true;
    1163     //}
    1164    
     1132
    11651133    // Load the global.properties file, get the tomcat.server.IPregex and check for any of it
    11661134    // matching against the local IP
Note: See TracChangeset for help on using the changeset viewer.