Changeset 36881
- Timestamp:
- 2022-11-04T13:04:44+13:00 (18 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/LibraryServlet.java
r36879 r36881 1113 1113 } 1114 1114 1115 1116 private void debugCheckAgainstRegex() {1117 1118 // Load the global.properties file, get the tomcat.server.IPregex and check for any of it1119 // matching against the local IP1120 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 1138 1115 1139 1116 /** … … 1153 1130 // if request emanates on same machine as GS server/from local machine, let it go through 1154 1131 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 1165 1133 // Load the global.properties file, get the tomcat.server.IPregex and check for any of it 1166 1134 // matching against the local IP
Note:
See TracChangeset
for help on using the changeset viewer.