Feature: Plant-it widget (#2941)

This commit is contained in:
Massimiliano De Luise 2024-02-20 02:54:28 +01:00 committed by GitHub
parent 841c74d58a
commit 619f365c92
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 91 additions and 0 deletions

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}`;
}