HTTP request address extracting interceptor
Interceptor that extracts the remote and local IP address & port and "X-Forwarded-For" header from the incoming HTTP request.
EndpointInterceptor
that extracts the remote and local IP address & port and the X-Forwarded-For HTTP header from each incoming HttpServletRequest
, and stores them as properties in the MessageContext
before the endpoint is invoked.
The properties added by this interceptor have the following names:
emagiz_ws_remoteAddress
emagiz_ws_remotePort
emagiz_ws_localAddress
emagiz_ws_localPort
emagiz_ws_forwardedFor
(present only if the request contains the "X-Forwarded-For" HTTP header)
The intended use of this interceptor is to prepare the MessageContext
for the Spring Integration Web Service Inbound Gateway (a MessageEndpoint
implementation), so it will add the remote and local IP address and port as message headers when constructing the resulting Spring Integration message. These message headers will have the same names as stated above.