ignore self signed certs
Build and Push Docker Images / build-and-push (push) Successful in 29s

This commit is contained in:
Bram committed 2026-11-04 12:17:49 +01:00
1 parent 454f1c9d6d
commit 8855d36684
7 files changed
+24 -6

No files matched your search

+10 -1
View File
@@ -44,6 +44,15 @@ function readConfigEntries() {
return;
}
let insecureTls = false;
if (item.insecureTls !== undefined) {
if (typeof item.insecureTls !== 'boolean') {
console.warn(`${label}: "insecureTls" must be a boolean, ignoring`);
} else {
insecureTls = item.insecureTls;
}
}
const validUrls = [];
const seenUrls = new Set();
urls.forEach((rawUrl, urlIndex) => {
@@ -77,7 +86,7 @@ function readConfigEntries() {
}
for (const url of validUrls) {
entries.push({ url, username, password, entryId: index });
entries.push({ url, username, password, entryId: index, insecureTls });
}
});
return entries;
+1 -1
View File
@@ -105,7 +105,7 @@ function probeUpstream(upstream) {
'Accept-Encoding': 'identity',
Connection: 'close',
},
rejectUnauthorized: settings.rejectUnauthorized,
rejectUnauthorized: upstream.rejectUnauthorized,
},
(res) => {
let body = '';
+1 -1
View File
@@ -303,7 +303,7 @@ function handleProxy(req, res, reqUrl) {
path: `${target.pathname}${target.search}`,
method: req.method,
headers,
rejectUnauthorized: settings.rejectUnauthorized,
rejectUnauthorized: upstream.rejectUnauthorized,
},
(proxyRes) => {
settled = true;
@@ -84,6 +84,7 @@ function selectUpstream(exclude = new Set()) {
function describeUpstream(upstream) {
return {
url: upstream.label,
insecureTls: upstream.insecureTls,
healthy: upstream.state.healthy,
busy: isBusy(upstream),
latencyMs: upstream.state.latencyMs,
+8 -1
View File
@@ -1,5 +1,7 @@
'use strict';
const { settings } = require('./settings');
function nowIso() {
return new Date().toISOString();
}
@@ -19,7 +21,7 @@ function baseState() {
}
class Upstream {
constructor({ url, username, password, entryId }) {
constructor({ url, username, password, entryId, insecureTls }) {
const parsed = new URL(url);
parsed.hash = '';
parsed.search = '';
@@ -28,10 +30,15 @@ class Upstream {
this.username = username;
this.password = password;
this.entryId = entryId;
this.insecureTls = insecureTls === true;
this.key = `${parsed.origin}${this.basePath}|${username}|${password}`;
this.state = { ...baseState(), inFlight: 0 };
}
get rejectUnauthorized() {
return this.insecureTls ? false : settings.rejectUnauthorized;
}
get label() {
return `${this.base.origin}${this.basePath}`;
}