I'm trying to send messages to rabbitmq with an HTML page with JS script which has the following lines:
var client = new StompJs.Client({ brokerURL: 'ws://localhost:15674/ws', connectedHeaders: { login: 'my_rabbit_username', passcode: 'my_rabbit_password' }, reconnectDelay: 5000, heartbeatIncoming: 4000, heartbeatOutgoing: 4000, }); client.activate(); function update_rabbit(){ var rabbitName = document.getElementById("myRabbitLoc").value; console.log(rabbitName); client = new StompJs.Client({ brokerURL: rabbitName, connectedHeaders: { login: 'my_rabbit_username', passcode: 'my_rabbit_password' }, reconnectDelay: 5000, heartbeatIncoming: 4000, heartbeatOutgoing: 4000, }); client.activate(); } client.onStompError = function (frame) { // Will be invoked in case of error encountered at Broker // Bad login/passcode typically will cause an error // Complaint brokers will set `message` header with a brief message. Body may contain details. // Compliant brokers will terminate the connection after any error console.log('Broker reported error: ' + frame.headers['message']); console.log('Additional details: ' + frame.body); };however if I'm trying to change "localhost" to any other pc name in my local network, or even change it to my own machine name the message won't arrive. and I'm getting the following meesage:
Broker reported error: Bad CONNECT xxx.html:153 Additional details: non-loopback access deniedWould really appreciate any help on how to make this work