private StaticFile getStaticPath(String path) { for (StaticFile staticPath : staticPaths) { if (staticPath.isStatic(path)) { return staticPath; } } return null; }
private void initHttpPipeline(ChannelHandlerContext ctx) { ctx.pipeline() .addLast(letsEncryptHandler) .addLast("HttpChunkedWrite", new ChunkedWriteHandler()) .addLast("HttpUrlMapper", new UrlReWriterHandler("/favicon.ico", "/static/favicon.ico")) .addLast("HttpStaticFile", new StaticFileHandler(holder.props, new StaticFile("/static"), new StaticFileEdsWith(FileUtils.CSV_DIR, ".gz"), new StaticFileEdsWith(FileUtils.CSV_DIR, ".zip"))) .addLast(resetPasswordLogic) .addLast(httpAPILogic) .addLast(noMatchHandler) .remove(this); if (log.isTraceEnabled()) { log.trace("Initialized http pipeline. {}", ctx.pipeline().names()); } }