Fix: Disable Certificate Validation
This commit is contained in:
1 parent
2bc797d349
commit
eaf9522706
1 file changed
+1
-4
@@ -746,7 +746,7 @@ class NetworkService implements INetworkService {
|
|||||||
|
|
||||||
private async requestWebSocket(monitor: Monitor): Promise<MonitorStatusResponse> {
|
private async requestWebSocket(monitor: Monitor): Promise<MonitorStatusResponse> {
|
||||||
try {
|
try {
|
||||||
const { url, ignoreTlsErrors } = monitor;
|
const { url } = monitor;
|
||||||
|
|
||||||
if (!url) {
|
if (!url) {
|
||||||
throw new Error("Monitor URL is required");
|
throw new Error("Monitor URL is required");
|
||||||
@@ -766,9 +766,6 @@ class NetworkService implements INetworkService {
|
|||||||
const { response, responseTime, error } = await this.timeRequest<{ connected: boolean }>(() => {
|
const { response, responseTime, error } = await this.timeRequest<{ connected: boolean }>(() => {
|
||||||
return new Promise<{ connected: boolean }>((resolve, reject) => {
|
return new Promise<{ connected: boolean }>((resolve, reject) => {
|
||||||
const wsOptions: Record<string, any> = {};
|
const wsOptions: Record<string, any> = {};
|
||||||
if (ignoreTlsErrors) {
|
|
||||||
wsOptions.rejectUnauthorized = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
const ws = new this.WebSocket(url, wsOptions);
|
const ws = new this.WebSocket(url, wsOptions);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user