protected void configureHandlerCompression(ServletContextHandler context) {
    if (configs.isApiGzipped()) {
      GzipHandler gzipHandler = new GzipHandler();
      gzipHandler.setIncludedMethods("GET", "POST", "PUT", "DELETE");
      gzipHandler.setExcludedPaths("*.woff", "*.ttf", "*.woff2", "*.eot", "*.svg");
      gzipHandler.setIncludedMimeTypes(
              "text/html", "text/plain", "text/xml", "text/css",
              "application/x-javascript", "application/xml",
              "application/x-www-form-urlencoded", "application/javascript",
              "application/json"
      );
      gzipHandler.setMinGzipSize(Integer.parseInt(configs.getApiGzipMinSize()));
      context.setGzipHandler(gzipHandler);
    }
  }
Performs GZIP compression configuration of the context handler
with static values and values from configuration file

@param context handler
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java