mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-24 14:02:13 +08:00
Enhancement: support speedtest v1.2 API (#4695)
This commit is contained in:
@@ -432,7 +432,7 @@ export function cleanServiceGroups(groups) {
|
||||
// frigate
|
||||
enableRecentEvents,
|
||||
|
||||
// beszel, glances, immich, mealie, pihole, pfsense
|
||||
// beszel, glances, immich, mealie, pihole, pfsense, speedtest
|
||||
version,
|
||||
|
||||
// glances
|
||||
@@ -610,7 +610,7 @@ export function cleanServiceGroups(groups) {
|
||||
if (snapshotHost) widget.snapshotHost = snapshotHost;
|
||||
if (snapshotPath) widget.snapshotPath = snapshotPath;
|
||||
}
|
||||
if (["beszel", "glances", "immich", "mealie", "pfsense", "pihole"].includes(type)) {
|
||||
if (["beszel", "glances", "immich", "mealie", "pfsense", "pihole", "speedtest"].includes(type)) {
|
||||
if (version) widget.version = parseInt(version, 10);
|
||||
}
|
||||
if (type === "glances") {
|
||||
|
||||
@@ -99,6 +99,11 @@ export default async function credentialedProxyHandler(req, res, map) {
|
||||
headers.Authorization = widget.password;
|
||||
} else if (widget.type === "gitlab") {
|
||||
headers["PRIVATE-TOKEN"] = widget.key;
|
||||
} else if (widget.type === "speedtest") {
|
||||
if (widget.key) {
|
||||
// v1 does not require a key
|
||||
headers.Authorization = `Bearer ${widget.key}`;
|
||||
}
|
||||
} else {
|
||||
headers["X-API-Key"] = `${widget.key}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user