mirror of
https://github.com/gethomepage/homepage.git
synced 2026-01-05 23:12:08 +08:00
Enhancement: support breaking changes in wg-easy v15 (#5343)
This commit is contained in:
@@ -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") {
|
||||
|
||||
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user