mirror of
https://github.com/gethomepage/homepage.git
synced 2026-10-17 16:01:43 -07:00
Chorehancement: add fileflows widget v2 for 26.10 breaking changes (#7239)
This commit is contained in:
@@ -130,6 +130,10 @@ export default async function credentialedProxyHandler(req, res, map) {
|
||||
headers.Authorization = widget.key;
|
||||
} else if (widget.type === "gitlab") {
|
||||
headers["PRIVATE-TOKEN"] = widget.key;
|
||||
} else if (widget.type === "fileflows") {
|
||||
if (widget.key) {
|
||||
headers["X-Webhook-Token"] = `${widget.key}`;
|
||||
}
|
||||
} else if (widget.type === "speedtest") {
|
||||
if (widget.key) {
|
||||
// v1 does not require a key
|
||||
|
||||
@@ -40,6 +40,7 @@ vi.mock("widgets/widgets", () => ({
|
||||
checkmk: { api: "{url}/{endpoint}" },
|
||||
stocks: { api: "{url}/{endpoint}" },
|
||||
speedtest: { api: "{url}/{endpoint}" },
|
||||
fileflows: { api: "{url}/{endpoint}" },
|
||||
tubearchivist: { api: "{url}/{endpoint}" },
|
||||
autobrr: { api: "{url}/{endpoint}" },
|
||||
jellystat: { api: "{url}/{endpoint}" },
|
||||
@@ -328,6 +329,7 @@ describe("utils/proxy/handlers/credentialed", () => {
|
||||
[{ type: "trilium", url: "http://x", key: "k" }, { Authorization: "k" }],
|
||||
[{ type: "gitlab", url: "http://x", key: "k" }, { "PRIVATE-TOKEN": "k" }],
|
||||
[{ type: "speedtest", url: "http://x", key: "k" }, { Authorization: "Bearer k" }],
|
||||
[{ type: "fileflows", url: "http://x", key: "k" }, { "X-Webhook-Token": "k" }],
|
||||
[
|
||||
{ type: "azuredevops", url: "http://x", key: "k" },
|
||||
{ Authorization: `Basic ${Buffer.from("$:k").toString("base64")}` },
|
||||
|
||||
Reference in New Issue
Block a user