Chorehancement: add fileflows widget v2 for 26.10 breaking changes (#7239)

This commit is contained in:
shamoon
2026-10-10 08:10:15 -07:00
committed by GitHub
parent 447c4f1467
commit 03ad0e5d30
8 changed files with 59 additions and 8 deletions
+4
View File
@@ -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")}` },