소스 검색

ws on prod

κρμγ 4 년 전
부모
커밋
c1934dd340
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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',