mirror of
https://github.com/grafana/grafana.git
synced 2025-01-26 16:27:02 -06:00
Fix: Changes WebSocket protocol to wss:// for https (#17173)
This commit is contained in:
parent
bfa7c3d963
commit
458bb3b0e3
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user