Lint rules and flow annotations for rest of the files
This commit is contained in:
@ -1,5 +1,11 @@
|
||||
export default function subdomainRedirect(options) {
|
||||
return async function subdomainRedirectMiddleware(ctx, next) {
|
||||
// @flow
|
||||
import { type Context } from 'koa';
|
||||
|
||||
export default function subdomainRedirect() {
|
||||
return async function subdomainRedirectMiddleware(
|
||||
ctx: Context,
|
||||
next: () => Promise<void>
|
||||
) {
|
||||
if (ctx.headers.host === 'getoutline.com') {
|
||||
ctx.redirect(`https://www.${ctx.headers.host}${ctx.path}`);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user