From 7d8da29e577bfa5af3926e5de037912788cca030 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 19 Mar 2023 23:03:12 -0700 Subject: [PATCH] Update credentialed.js --- src/utils/proxy/handlers/credentialed.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/utils/proxy/handlers/credentialed.js b/src/utils/proxy/handlers/credentialed.js index 133d42966..56bbb1516 100644 --- a/src/utils/proxy/handlers/credentialed.js +++ b/src/utils/proxy/handlers/credentialed.js @@ -49,11 +49,9 @@ export default async function credentialedProxyHandler(req, res, map) { } else if (widget.type === "miniflux") { headers["X-Auth-Token"] = `${widget.key}`; } else if (widget.type === "nextcloud") { - if ('key' in widget) { - logger.debug("Setting nextcloud to use NC-Token"); + if (widget.key) { headers["NC-Token"] = `${widget.key}`; } else { - logger.debug("Setting nextcloud to use username", widget.username); headers.Authorization = `Basic ${Buffer.from(`${widget.username}:${widget.password}`).toString("base64")}`; } } else {