Package org.apache.pinot.broker.api
Class HttpRequesterIdentity
- java.lang.Object
-
- org.apache.pinot.broker.api.RequesterIdentity
-
- org.apache.pinot.broker.api.HttpRequesterIdentity
-
public class HttpRequesterIdentity extends RequesterIdentity
Identity container for HTTP requests with (optional) authorization headers
-
-
Constructor Summary
Constructors Constructor Description HttpRequesterIdentity()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HttpRequesterIdentityfromRequest(org.glassfish.grizzly.http.server.Request request)StringgetClientIp()If reverse proxy is used X-Forwarded-For will be populated If X-Forwarded-For is not present, check if x-real-ip is present Since X-Forwarded-For can contain comma separated list of values, we convert it to ";" delimiter to avoid downstream parsing errors for other fields where "," is being usedStringgetEndpointUrl()com.google.common.collect.Multimap<String,String>getHttpHeaders()voidsetEndpointUrl(String endpointUrl)voidsetHttpHeaders(com.google.common.collect.Multimap<String,String> httpHeaders)
-
-
-
Method Detail
-
fromRequest
public static HttpRequesterIdentity fromRequest(org.glassfish.grizzly.http.server.Request request)
-
setHttpHeaders
public void setHttpHeaders(com.google.common.collect.Multimap<String,String> httpHeaders)
-
getEndpointUrl
public String getEndpointUrl()
-
setEndpointUrl
public void setEndpointUrl(String endpointUrl)
-
getClientIp
public String getClientIp()
If reverse proxy is used X-Forwarded-For will be populated If X-Forwarded-For is not present, check if x-real-ip is present Since X-Forwarded-For can contain comma separated list of values, we convert it to ";" delimiter to avoid downstream parsing errors for other fields where "," is being used- Overrides:
getClientIpin classRequesterIdentity
-
-