From bd88d3de8b534fba227881b68d4dfdf93081f0cb Mon Sep 17 00:00:00 2001 From: Viren070 Date: Sun, 31 Aug 2025 18:57:58 +0100 Subject: [PATCH] fix: update alias route to handle requested path correctly with express 5 --- packages/server/src/routes/stremio/alias.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/server/src/routes/stremio/alias.ts b/packages/server/src/routes/stremio/alias.ts index 7de9338a..313600be 100644 --- a/packages/server/src/routes/stremio/alias.ts +++ b/packages/server/src/routes/stremio/alias.ts @@ -12,9 +12,12 @@ interface AliasParams { [key: string]: string; } -router.get('/:alias/*any', (req: Request, res) => { +router.get('/:alias/*wildcardPath', (req: Request, res) => { const { alias } = req.params; - const wildcardPath = req.params[0] || ''; + let { wildcardPath } = req.params; + if (Array.isArray(wildcardPath)) { + wildcardPath = wildcardPath.join('/'); + } const configuration = Env.ALIASED_CONFIGURATIONS[alias]; if (!configuration || !configuration.uuid || !configuration.password) {