Browse Source

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

Hugo Häggmark 6 years ago
parent
commit
458bb3b0e3
1 changed files with 1 additions and 1 deletions
  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);