protected void configureHttpResponseHeaderFilter(ServletContextHandler context, String headerConfig) {
        FilterHolder headerFilterHolder = new FilterHolder(HeaderFilter.class);
        headerFilterHolder.setInitParameter("headerConfig", headerConfig);
        context.addFilter(headerFilterHolder, "/*", EnumSet.of(DispatcherType.REQUEST));
    }
Register header filter to ServletContextHandler.
@param context The servlet context handler
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/RestServer.java