mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-17 02:09:49 +00:00
Enhancement: support speedtest v1.2 API (#4695)
This commit is contained in:
parent
cbacf458b2
commit
07dff4c8a5
5 changed files with 26 additions and 9 deletions
|
@ -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}`;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue