public class UserAgentHeaderFilter extends Object implements HeaderFilter
If using this on a service that serves requests from the outside world, it would be a good idea to block the User-Agent header in the web facing load balancer/proxy.
HeaderFilter.Composite
NONE
Constructor and Description |
---|
UserAgentHeaderFilter() |
Modifier and Type | Method and Description |
---|---|
RequestHeader |
transformClientRequest(RequestHeader request)
Transform the given client request.
|
ResponseHeader |
transformClientResponse(ResponseHeader response,
RequestHeader request)
Transform the given client response.
|
RequestHeader |
transformServerRequest(RequestHeader request)
Transform the given server request.
|
ResponseHeader |
transformServerResponse(ResponseHeader response,
RequestHeader request)
Transform the given server response.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
composite
public RequestHeader transformClientRequest(RequestHeader request)
HeaderFilter
This will be invoked on all requests outgoing from the client.
transformClientRequest
in interface HeaderFilter
request
- The client request header.public RequestHeader transformServerRequest(RequestHeader request)
HeaderFilter
This will be invoked on all requests incoming to the server.
transformServerRequest
in interface HeaderFilter
request
- The server request header.public ResponseHeader transformServerResponse(ResponseHeader response, RequestHeader request)
HeaderFilter
This will be invoked on all responses outgoing from the server.
transformServerResponse
in interface HeaderFilter
response
- The server response.request
- The transformed server request. Useful for when the response transformation
requires information from the client.public ResponseHeader transformClientResponse(ResponseHeader response, RequestHeader request)
HeaderFilter
This will be invoked on all responses incoming to the client.
transformClientResponse
in interface HeaderFilter
response
- The client response.request
- The client request. Useful for when the response transformation requires
information from the client request.