Enhancement: support breaking changes in wg-easy v15 (#5343)
Some checks failed
Docker CI / Linting Checks (push) Has been cancelled
Docker CI / Docker Build & Push (push) Has been cancelled
Crowdin Action / Crowdin Sync (push) Has been cancelled

This commit is contained in:
shamoon
2025-05-31 22:08:49 -07:00
committed by GitHub
parent 35be5559b3
commit 524cb7695c
5 changed files with 21 additions and 3 deletions

View File

@@ -497,7 +497,9 @@ export function cleanServiceGroups(groups) {
if (snapshotHost) widget.snapshotHost = snapshotHost;
if (snapshotPath) widget.snapshotPath = snapshotPath;
}
if (["beszel", "glances", "immich", "komga", "mealie", "pfsense", "pihole", "speedtest"].includes(type)) {
if (
["beszel", "glances", "immich", "komga", "mealie", "pfsense", "pihole", "speedtest", "wgeasy"].includes(type)
) {
if (version) widget.version = parseInt(version, 10);
}
if (type === "glances") {

View File

@@ -101,7 +101,11 @@ export default async function credentialedProxyHandler(req, res, map) {
headers.Cookie = `authenticated=${widget.key}`;
}
} else if (widget.type === "wgeasy") {
headers.Authorization = widget.password;
if (widget.username && widget.password) {
headers.Authorization = `Basic ${Buffer.from(`${widget.username}:${widget.password}`).toString("base64")}`;
} else {
headers.Authorization = widget.password;
}
} else if (widget.type === "gitlab") {
headers["PRIVATE-TOKEN"] = widget.key;
} else if (widget.type === "speedtest") {