added api key authentication

might work, unable to test
pull/3076/head
zmweske 3 months ago committed by GitHub
parent da57b2779a
commit 50c26e2524
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -25,7 +25,9 @@ export default async function genericProxyHandler(req, res, map) {
const headers = req.extraHeaders ?? widget.headers ?? {};
if (widget.username && widget.password) {
if (widget.key) {
headers.Authorization = `${widget.key}`;
} else if (widget.username && widget.password) {
headers.Authorization = `Basic ${Buffer.from(`${widget.username}:${widget.password}`).toString("base64")}`;
}

Loading…
Cancel
Save