Feature: Plant-it widget (#2941)

This commit is contained in:
Massimiliano De Luise authored and GitHub committed 2024-02-19 17:54:28 -08:00
1 parent 841c74d58a
commit 619f365c92
9 files changed
+91

No files matched your search

+2
View File
@@ -65,6 +65,8 @@ export default async function credentialedProxyHandler(req, res, map) {
headers.Authorization = `Basic ${Buffer.from(`$:${widget.key}`).toString("base64")}`;
} else if (widget.type === "glances") {
headers.Authorization = `Basic ${Buffer.from(`${widget.username}:${widget.password}`).toString("base64")}`;
} else if (widget.type === "plantit") {
headers.Key = `${widget.key}`;
} else {
headers["X-API-Key"] = `${widget.key}`;
}