Class InterceptorResource
- java.lang.Object
-
- fr.gouv.vitam.elastic.kibana.interceptor.rest.InterceptorResource
-
@Path("/") public class InterceptorResource extends java.lang.Object
InterceptorResource : intercept request between elastic and kibana replace underscore by sharp and suppress undesired header
-
-
Constructor Summary
Constructors Constructor Description InterceptorResource(InterceptorConfiguration interceptorConfiguration)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.Response
handleHeadElasticRequestFromKibana(javax.ws.rs.core.UriInfo info, java.lang.String url, javax.servlet.http.HttpServletRequest req, javax.ws.rs.core.HttpHeaders headers)
Juste Filter the request not the responsejavax.ws.rs.core.Response
process(java.lang.String url, javax.ws.rs.core.UriInfo info, javax.servlet.http.HttpServletRequest req, javax.ws.rs.core.HttpHeaders headers)
Filter kibana request and response
-
-
-
Constructor Detail
-
InterceptorResource
public InterceptorResource(InterceptorConfiguration interceptorConfiguration)
Constructor
-
-
Method Detail
-
handleHeadElasticRequestFromKibana
@HEAD @Path("{url: .*}") public javax.ws.rs.core.Response handleHeadElasticRequestFromKibana(@Context javax.ws.rs.core.UriInfo info, @PathParam("url") java.lang.String url, @Context javax.servlet.http.HttpServletRequest req, @Context javax.ws.rs.core.HttpHeaders headers)
Juste Filter the request not the response- Parameters:
url
- urlinfo
- UriInforeq
- HttpServletRequestheaders
- HttpHeaders- Returns:
- elasticSearch response.
-
process
@GET @POST @OPTIONS @DELETE @PUT @Path("{url: .*}") public javax.ws.rs.core.Response process(@PathParam("url") java.lang.String url, @Context javax.ws.rs.core.UriInfo info, @Context javax.servlet.http.HttpServletRequest req, @Context javax.ws.rs.core.HttpHeaders headers) throws java.io.IOException
Filter kibana request and response- Parameters:
url
- urlinfo
- UriInforeq
- HttpServletRequestheaders
- HttpHeaders- Returns:
- the given elasticsearch Response filtered with sharp
- Throws:
java.io.IOException
- IOException
-
-