Traccar Websockets connection

Tech Pass10 months ago

Hello,
Now am using demo4 server apis to get positions data from it now i want to use websockets for live update but connection failed "ws://demo4.traccar.org/api/socket" am running the project on localhost 3000 can the problem be that am using two different hosts or there is an another reason and here is the ws code :

[object Object]
Anton Tananaev10 months ago

How do you expect this to work with the cross-origin restrictions in browsers?

Tech Pass10 months ago

How can I handle this problem