From ee2fce1bdf5906851bab4606cc4f34379bb360e8 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Thu, 2 Jan 2020 11:36:21 -0500 Subject: [PATCH] redirect home to following page until we have an actual home page --- lbrytv/middleware/redirect.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lbrytv/middleware/redirect.js b/lbrytv/middleware/redirect.js index 05caa563c..1604942f3 100644 --- a/lbrytv/middleware/redirect.js +++ b/lbrytv/middleware/redirect.js @@ -13,6 +13,11 @@ async function redirectMiddleware(ctx, next) { return; } + if (path === '/') { + ctx.redirect(`/$/${PAGES.CHANNELS_FOLLOWING}`); + return; + } + if (!path.startsWith('/$/') && path.match(/^([^@/:]+)\/([^:/]+)$/)) { ctx.redirect(url.replace(/^([^@/:]+)\/([^:/]+)(:(\/.*))/, '$1:$2')); // test against path, but use ctx.url to retain parameters return;