|
|
|
@ -55,6 +55,12 @@ export default async function credentialedProxyHandler(req, res, map) {
|
|
|
|
|
} else {
|
|
|
|
|
headers.Authorization = `Basic ${Buffer.from(`${widget.username}:${widget.password}`).toString("base64")}`;
|
|
|
|
|
}
|
|
|
|
|
} else if (widget.type === "paperlessngx") {
|
|
|
|
|
if (widget.key) {
|
|
|
|
|
headers.Authorization = `Token ${widget.key}`;
|
|
|
|
|
} else {
|
|
|
|
|
headers.Authorization = `Basic ${Buffer.from(`${widget.username}:${widget.password}`).toString("base64")}`;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
headers["X-API-Key"] = `${widget.key}`;
|
|
|
|
|
}
|
|
|
|
|