From befbf31527345adf511a2c8ff9fcb4a4b9f249be Mon Sep 17 00:00:00 2001 From: Viren070 Date: Mon, 10 Feb 2025 01:45:45 +0000 Subject: [PATCH] fix: decode on cf worker --- packages/cloudflare-worker/src/index.ts | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/packages/cloudflare-worker/src/index.ts b/packages/cloudflare-worker/src/index.ts index 74a4a07c..0a5d18e0 100644 --- a/packages/cloudflare-worker/src/index.ts +++ b/packages/cloudflare-worker/src/index.ts @@ -62,28 +62,11 @@ export default { if (components.includes('stream')) { // when /stream is requested without config - /* - if (components.length < 4) { - return createJsonResponse( - errorResponse( - 'You must configure this addon first', - url.origin, - '/configure' - ) - ); - } - - const config = components[0]; - const decodedPath = decodeURIComponent(url.pathname); - - const streamMatch = /stream\/(movie|series)\/([^/]+)\.json/.exec( - decodedPath.replace(`/${config}`, '') - ); - */ let config = components[0]; while (components.length > 4) { config += `/${components.splice(1, 1)[0]}`; } + config = decodeURIComponent(config); if (components.length < 4) { return createJsonResponse( errorResponse(