κρμγ 4 vuotta sitten
vanhempi
commit
c1934dd340
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      src/app/src/app/stomp.config.ts

+ 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',