diff --git a/lbrytv/middleware/redirect.js b/lbrytv/middleware/redirect.js index 1604942f3..80877e415 100644 --- a/lbrytv/middleware/redirect.js +++ b/lbrytv/middleware/redirect.js @@ -7,6 +7,12 @@ async function redirectMiddleware(ctx, next) { const requestHost = ctx.host; const path = ctx.path; const url = ctx.url; + const decodedUrl = decodeURIComponent(url); + + if (decodedUrl !== url) { + ctx.redirect(decodedUrl); + return; + } if (path.endsWith('/') && path.length > 1) { ctx.redirect(url.replace(/\/$/, ''));