mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-10 15:28:47 +00:00
Add support for auth token
This commit is contained in:
parent
f05ac3247d
commit
8f0cd7e088
2 changed files with 8 additions and 2 deletions
|
@ -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}`;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue