I currently have 2 challenges that i have tried to implement but can’t really figure out how to do.
I currently have crossbar working with nodejs as a guest worker. In crossbar i can define multiple realms and connect to that. However, the guest worker has also defined a static websocket connection. I need to match these. So if somebody connects to realm1, the guestworker needs to have the settings to connect to realm1. If i connect to realm2, the guestworker needs to connect to realm2.
Visitor from website a is connecting to crossbar with realm: www.website1.com and on another website the visitor is connecting with a realm of www.website2.com. Now in the nodejs guestworker i want to be able to somehow ‘detect’ from which realm they connect and retrieve some specific contect from a database. That database part is already in place, i just need to be able to distinct this somehow in the nodejs worker. Anybody has an idea how to do this?
I tried to pass ENV variables and extend them to the guesworker however, these are not on a worker base so i can’t easily pass an extra payload to it.
Thanks in advance