redirect home to following page until we have an actual home page
This commit is contained in:
parent
a8711c027f
commit
ee2fce1bdf
1 changed files with 5 additions and 0 deletions
|
@ -13,6 +13,11 @@ async function redirectMiddleware(ctx, next) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (path === '/') {
|
||||||
|
ctx.redirect(`/$/${PAGES.CHANNELS_FOLLOWING}`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!path.startsWith('/$/') && path.match(/^([^@/:]+)\/([^:/]+)$/)) {
|
if (!path.startsWith('/$/') && path.match(/^([^@/:]+)\/([^:/]+)$/)) {
|
||||||
ctx.redirect(url.replace(/^([^@/:]+)\/([^:/]+)(:(\/.*))/, '$1:$2')); // test against path, but use ctx.url to retain parameters
|
ctx.redirect(url.replace(/^([^@/:]+)\/([^:/]+)(:(\/.*))/, '$1:$2')); // test against path, but use ctx.url to retain parameters
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue