Usenet streaming with a WebDAV server and a SABnzbd-compatible API
C#
Fixed bug surfaced by rclone v1.73.2; support proxying url-encoded requests.
nzbdav-devc37be6fa1fbd
diff --git a/frontend/server.ts b/frontend/server.tsindex 9c2cc412..2c66d99c 100644--- a/frontend/server.ts+++ b/frontend/server.ts@@ -15,7 +15,7 @@ app.use(compression({// Don't compress proxied WebDAV/media/API responses; keep Content-Length intact for seekfilter: (req, res) => {- const path = req.path || "";+ const path = decodeURIComponent(req.path || "");if (path.startsWith("/view") ||path.startsWith("/.ids") ||diff --git a/frontend/server/app.ts b/frontend/server/app.tsindex 7efd66bc..3fec0913 100644--- a/frontend/server/app.ts+++ b/frontend/server/app.ts@@ -47,15 +47,16 @@ const setApiKeyForAuthenticatedRequests = async (req: express.Request) => {}app.use(async (req, res, next) => {+ const path = decodeURIComponent(req.path);if (req.method.toUpperCase() === "PROPFIND"|| req.method.toUpperCase() === "OPTIONS"- || req.path.startsWith("/api")- || req.path.startsWith("/view")- || req.path.startsWith("/.ids")- || req.path.startsWith("/nzbs")- || req.path.startsWith("/content")- || req.path.startsWith("/completed-symlinks")+ || path.startsWith("/api")+ || path.startsWith("/view")+ || path.startsWith("/.ids")+ || path.startsWith("/nzbs")+ || path.startsWith("/content")+ || path.startsWith("/completed-symlinks")) {await setApiKeyForAuthenticatedRequests(req);return forwardToBackend(req, res, next);