| | |
| | | */ |
| | | String pattern = (String) exchange.getHttpContext().getAttributes() |
| | | .getOrDefault("imageFilterPattern", ".+\\.jpg|.+\\.jpeg|.+\\.png"); |
| | | String uriStr = exchange.getRequestURI().toString(); |
| | | String uriStr = exchange.getRequestURI().toString().toLowerCase(); |
| | | if(uriStr.contains("?")) { |
| | | uriStr = uriStr.substring(0, uriStr.indexOf("?")); |
| | | } |
| | | try { |
| | | String fName = new HttpHelper().getFileName(exchange); |
| | | if(uriStr.toLowerCase().matches(pattern)) { |
| | | if(uriStr.matches(pattern)) { |
| | | String fileBase = (String) exchange.getHttpContext().getAttributes() |
| | | .get(FileServer.ATTR_FILE_BASE); |
| | | String fileName = exchange |