mirror of https://github.com/apache/activemq.git
[AMQ-8138] Set client IP address with Stomp host header
(cherry picked from commit 2e169f0bc3
)
This commit is contained in:
parent
6c4c94bb8d
commit
6bb09feed5
|
@ -752,6 +752,7 @@ public class ProtocolConverter {
|
||||||
String passcode = headers.get(Stomp.Headers.Connect.PASSCODE);
|
String passcode = headers.get(Stomp.Headers.Connect.PASSCODE);
|
||||||
String clientId = headers.get(Stomp.Headers.Connect.CLIENT_ID);
|
String clientId = headers.get(Stomp.Headers.Connect.CLIENT_ID);
|
||||||
String heartBeat = headers.get(Stomp.Headers.Connect.HEART_BEAT);
|
String heartBeat = headers.get(Stomp.Headers.Connect.HEART_BEAT);
|
||||||
|
String host = headers.get(Stomp.Headers.Connect.HOST);
|
||||||
|
|
||||||
if (heartBeat == null) {
|
if (heartBeat == null) {
|
||||||
heartBeat = defaultHeartBeat;
|
heartBeat = defaultHeartBeat;
|
||||||
|
@ -768,6 +769,7 @@ public class ProtocolConverter {
|
||||||
} else {
|
} else {
|
||||||
connectionInfo.setClientId("" + connectionInfo.getConnectionId().toString());
|
connectionInfo.setClientId("" + connectionInfo.getConnectionId().toString());
|
||||||
}
|
}
|
||||||
|
connectionInfo.setClientIp(host);
|
||||||
|
|
||||||
connectionInfo.setResponseRequired(true);
|
connectionInfo.setResponseRequired(true);
|
||||||
connectionInfo.setUserName(login);
|
connectionInfo.setUserName(login);
|
||||||
|
|
Loading…
Reference in New Issue