2
0
κρμγ 5 жил өмнө
parent
commit
c1934dd340

+ 1 - 1
src/app/src/app/stomp.config.ts

@@ -1,7 +1,7 @@
 import {InjectableRxStompConfig} from '@stomp/ng2-stompjs';
 
 export const myRxStompConfig: InjectableRxStompConfig = {
-  brokerURL: `ws://${window.location.host}:${window.location.port}/ws`,
+  brokerURL: `${window.location.protocol === 'https:' ? 'wss' : 'ws'}://${window.location.host}:${window.location.port}/ws`,
 
   connectHeaders: {
     login: 'web',