mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-07-21 11:40:56 +00:00
Use wss://
instead of ws://
in case of HTTPS (#573)
This commit is contained in:
parent
da2aaa9bd8
commit
f535719ddd
@ -211,7 +211,7 @@ export const TrafficPage: React.FC<TrafficPageProps> = ({setAnalyzeStatus, onTLS
|
|||||||
const entryData = await api.getEntry(focusedEntryId);
|
const entryData = await api.getEntry(focusedEntryId);
|
||||||
setSelectedEntryData(entryData);
|
setSelectedEntryData(entryData);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.response) {
|
if (error.response?.data?.type) {
|
||||||
toast[error.response.data.type](`Entry[${focusedEntryId}]: ${error.response.data.msg}`, {
|
toast[error.response.data.type](`Entry[${focusedEntryId}]: ${error.response.data.msg}`, {
|
||||||
position: "bottom-right",
|
position: "bottom-right",
|
||||||
theme: "colored",
|
theme: "colored",
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
import * as axios from "axios";
|
import * as axios from "axios";
|
||||||
|
|
||||||
// When working locally cp `cp .env.example .env`
|
// When working locally cp `cp .env.example .env`
|
||||||
export const MizuWebsocketURL = process.env.REACT_APP_OVERRIDE_WS_URL ? process.env.REACT_APP_OVERRIDE_WS_URL : `ws://${window.location.host}/ws`;
|
export const MizuWebsocketURL = process.env.REACT_APP_OVERRIDE_WS_URL ? process.env.REACT_APP_OVERRIDE_WS_URL :
|
||||||
|
window.location.protocol === 'https:' ? `wss://${window.location.host}/ws` : `ws://${window.location.host}/ws`;
|
||||||
|
|
||||||
const CancelToken = axios.CancelToken;
|
const CancelToken = axios.CancelToken;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user