code: protected static final boolean filteringResources(final HttpServletRequest req, final HttpServletResponse resp, final FilterChain chain, final String path, final Function<String,String> needsTranslation) throws ServletException, IOException {
          String translated = needsTranslation.apply(path);
  //        String translated = translateResource(path);
          if (translated != null) {
  //            logger.debug("URI excluded: {}", path);
              
              HttpServletRequest r = req;
              if (path.length() != translated.length()) {//!path.startsWith(translated)) {
  //                int indexOfExcluded = path.indexOf(translated);
  //                String t = path.substring(indexOfExcluded);
                  r = createServletRequest(req, translated);
  //                logger.debug(".. and translated -> {}", translated);
              }
              
              
              // Setting default headers for static files
              // One week - Google recommendation
              // https://developers.google.com/speed/docs/insights/LeverageBrowserCaching
              resp.setHeader(HttpHeaders.CACHE_CONTROL, "public, max-age=604800");
              File file = new File(req.getServletContext().getRealPath(translated));
              if (file.canRead())
                  resp.setHeader(HttpHeaders.ETAG, String.valueOf(file.lastModified()));
              
              chain.doFilter(r, resp);
              return true;
          }
          return false;
      }
docs: TODO extract to an independent Filter