Reputation: 351
With the Mule Ajax connector, is it possible to determine the IP address of the client?
<ajax:inbound-endpoint channel="/services/testservice" connector-ref="AjaxConnector" responseTimeout="10000" doc:name="AJAX Test"/>
<logger message="#[What Would I put here to get me the client IP]" level="INFO" doc:name="Logger"/>
Upvotes: 2
Views: 79
Reputation: 18637
OMG, the CometD version used by Mule is older than dinosaurs !
Mule is basically using version 0.x from almost 10 years ago, when CometD was still under the org.mortbay.cometd
namespace.
Since then, CometD graduated to an independent project under the org.cometd
namespace.
CometD is currently at version 3.x, and the current APIs do have a way to retrieve the IP address of the client.
Someone with a JIRA login please file an issue to Mulesoft.
Upvotes: 1
Reputation: 33413
I don't see any provision for this in the source code: https://github.com/mulesoft/mule/tree/3.7.2/transports/ajax/src/main/java/org/mule/transport/ajax
All I can see is the addition to the message of a flow var named ajax.cometd.client
, which contains an instance of org.cometd.Client
that exposes a getId()
method. This is probably an opaque ID but it may contain the IP?
So I reckon the answer is no.
Upvotes: 1