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) {