...
Implementation will use the Jetty HeaderFilter
class. We need to update org.apache.kafka.connect.runtime.rest.RestServer
class. During initialization the Connect REST server will read all header configurations from the property with prefix filterresponse.http.nameheaders., then create a list of FilterHolder
with HeaderFilter
class and add the list of filter holders to the Servlet context handler based on the name of the filter. Implementation is similar to how we handle the header access.control.allow.origin
in the Connect REST server.
...