Files
Tom Moor bf45e97641 chore: Enforce type import consistency (#10968)
* Update types

* fix circular dep

* type imports

* lint type imports and --fix
2025-12-19 23:07:02 -05:00

12 lines
321 B
TypeScript

import type { Context, Next } from "koa";
export default function apexRedirect() {
return async function apexRedirectMiddleware(ctx: Context, next: Next) {
if (ctx.headers.host === "getoutline.com") {
ctx.redirect(`https://www.${ctx.headers.host}${ctx.path}`);
} else {
return next();
}
};
}