Cleanup
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
export default function subdomainRedirect(options) {
|
||||
return async function subdomainRedirectMiddleware(ctx, next) {
|
||||
if (ctx.headers.host === 'beautifulatlas.com') {
|
||||
ctx.redirect('https://www.' + ctx.headers.host + ctx.path);
|
||||
ctx.redirect(`https://www.${ctx.headers.host}${ctx.path}`);
|
||||
} else {
|
||||
return next();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user