瀏覽代碼

Fix: Changes WebSocket protocol to wss:// for https (#17173)

Hugo Häggmark 6 年之前
父節點
當前提交
458bb3b0e3
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      public/app/features/explore/state/epics.ts

+ 1 - 1
public/app/features/explore/state/epics.ts

@@ -16,7 +16,7 @@ import { SeriesData } from '@grafana/ui/src/types/data';
 import { EpicDependencies } from 'app/store/configureStore';
 
 const convertToWebSocketUrl = (url: string) => {
-  const protocol = window.location.protocol === 'https' ? 'wss://' : 'ws://';
+  const protocol = window.location.protocol === 'https:' ? 'wss://' : 'ws://';
   let backend = `${protocol}${window.location.host}${config.appSubUrl}`;
   if (backend.endsWith('/')) {
     backend = backend.slice(0, backend.length - 1);