All Downloads are FREE. Search and download functionalities are using the official Maven repository.

brave.http.HttpServerAdapter Maven / Gradle / Ivy

There is a newer version: 6.1.0
Show newest version
package brave.http;

import zipkin2.Endpoint;

public abstract class HttpServerAdapter extends HttpAdapter {

  /**
   * Returns true if an IP representing the client was readable. Defaults to parse the
   * "X-Forwarded-For" header.
   */
  public boolean parseClientAddress(Req req, Endpoint.Builder builder) {
    String xForwardedFor = requestHeader(req, "X-Forwarded-For");
    return xForwardedFor != null && builder.parseIp(xForwardedFor);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy