Class StandardResponseHeaderFilterHolder

java.lang.Object
org.apache.druid.server.initialization.jetty.StandardResponseHeaderFilterHolder
All Implemented Interfaces:
ServletFilterHolder

public class StandardResponseHeaderFilterHolder extends Object implements ServletFilterHolder
Adds response headers that we want to have on all responses.
  • Constructor Details

    • StandardResponseHeaderFilterHolder

      @Inject public StandardResponseHeaderFilterHolder(ServerConfig serverConfig)
  • Method Details

    • deduplicateHeadersInProxyServlet

      public static void deduplicateHeadersInProxyServlet(javax.servlet.http.HttpServletResponse proxyResponse, org.eclipse.jetty.client.api.Response serverResponse)
      Remove any standard headers in proxyResponse if they were also set in the origin response, serverResponse. This prevents duplicates headers from appearing in proxy responses. Used by implementations of AsyncProxyServlet.
    • getFilter

      public javax.servlet.Filter getFilter()
      Description copied from interface: ServletFilterHolder
      Get the Filter object that should be added to the servlet. This method is considered "mutually exclusive" from the getFilterClass method. That is, one of them should return null and the other should return an actual value.
      Specified by:
      getFilter in interface ServletFilterHolder
      Returns:
      The Filter object to be added to the servlet
    • getFilterClass

      public Class<? extends javax.servlet.Filter> getFilterClass()
      Description copied from interface: ServletFilterHolder
      Get the class of the Filter object that should be added to the servlet. This method is considered "mutually exclusive" from the getFilter method. That is, one of them should return null and the other should return an actual value.
      Specified by:
      getFilterClass in interface ServletFilterHolder
      Returns:
      The class of the Filter object to be added to the servlet
    • getInitParameters

      public Map<String,String> getInitParameters()
      Description copied from interface: ServletFilterHolder
      Get Filter initialization parameters.
      Specified by:
      getInitParameters in interface ServletFilterHolder
      Returns:
      a map containing all the Filter initialization parameters
    • getPath

      public String getPath()
      Description copied from interface: ServletFilterHolder
      This method is deprecated, please implement ServletFilterHolder.getPaths(). The path that this Filter should apply to
      Specified by:
      getPath in interface ServletFilterHolder
      Returns:
      the path that this Filter should apply to
    • getDispatcherType

      @Nullable public EnumSet<javax.servlet.DispatcherType> getDispatcherType()
      Description copied from interface: ServletFilterHolder
      The dispatcher type that this Filter should apply to
      Specified by:
      getDispatcherType in interface ServletFilterHolder
      Returns:
      the enumeration of DispatcherTypes that this Filter should apply to