|
|
@ -89,7 +89,9 @@ export default async function credentialedProxyHandler(req, res, map) {
|
|
|
|
} else if (widget.type === "myspeed") {
|
|
|
|
} else if (widget.type === "myspeed") {
|
|
|
|
headers.Password = `${widget.password}`;
|
|
|
|
headers.Password = `${widget.password}`;
|
|
|
|
} else if (widget.type === "esphome") {
|
|
|
|
} else if (widget.type === "esphome") {
|
|
|
|
if (widget.key) {
|
|
|
|
if (widget.username && widget.password) {
|
|
|
|
|
|
|
|
headers.Authorization = `Basic ${Buffer.from(`${widget.username}:${widget.password}`).toString("base64")}`;
|
|
|
|
|
|
|
|
} else if (widget.key) {
|
|
|
|
headers.Cookie = `authenticated=${widget.key}`;
|
|
|
|
headers.Cookie = `authenticated=${widget.key}`;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (widget.type === "wgeasy") {
|
|
|
|
} else if (widget.type === "wgeasy") {
|
|
|
|