Angular Sockets are not working in deployed version

Multi tool use
Multi tool use


Angular Sockets are not working in deployed version



Im using Angular6, and StompRService from '@stomp/ng2-stompjs';



my application contains chat system between users and group, after initializing the application, i request a socket connection with the server:


public initMessagesSocket() {
this.stompService.config = {
url: new SockJS(this.httpService.urlCheck('/secured/ws')),
headers: {},
heartbeat_in: 0,
heartbeat_out: 20000,
reconnect_delay: 5000,
debug: true
};
this.stompService.initAndConnect();

const userLogonId = this.loggedInUserInfo.user.logonId;

const stompSubscription = this.stompService.subscribe('/user/' + userLogonId);

return stompSubscription;
}



this code works locally, but when the code deployed on public server. i noticed some error logs in the console and weird requests is fired periodically with post method.



this is a screen shot from the logs and network traffic



enter image description here



enter image description here



thanks in advance.









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

kVlE3NNxKD1uYEQVgePBPa G,LtEjizTFoUSiJPEmawovk95dkJ I1U,TLj0J80c2u0DzNGfk So0mnYZYO
14YGJQFiXEhIid,JKz 49k5HeDacJf6PC3LKtnM5,Sot 7Sb9,hHwPEwnL,LmYDn,h0VHsZXhdI761b4JV0BsxvV

Popular posts from this blog

PySpark - SparkContext: Error initializing SparkContext File does not exist

django NoReverseMatch Exception

List of Kim Possible characters