private void initAdminPipeline(ChannelHandlerContext ctx) { if (!ipFilterHandler.accept(ctx)) { ctx.close(); return; } var pipeline = ctx.pipeline(); pipeline.addLast(new UploadHandler(holder.props.jarPath, "/upload", "/static/ota")) .addLast(new OTAHandler(holder, rootPath + "/ota/start", "/static/ota")) .addLast(adminAuthHandler) .addLast(authCookieHandler) .addLast(cookieBasedUrlReWriterHandler); pipeline.remove(StaticFileHandler.class); pipeline.addLast(new StaticFileHandler(holder.props, new NoCacheStaticFile("/static"))) .addLast(otaLogic) .addLast(usersLogic) .addLast(statsLogic) .addLast(configsLogic) .addLast(hardwareStatsLogic) .addLast(httpAPILogic) .addLast(noMatchHandler) .remove(this); if (log.isTraceEnabled()) { log.trace("Initialized admin pipeline. {}", ctx.pipeline().names()); } }