feat: init install mode

This commit is contained in:
swve 2023-07-10 15:05:11 +01:00
parent 687f7b2116
commit 056365dac9
21 changed files with 1230 additions and 6 deletions

View file

@ -28,6 +28,11 @@ export default function middleware(req: NextRequest) {
return NextResponse.rewrite(new URL(pathname, req.url));
}
// Install Page
if (pathname.startsWith("/install")) {
return NextResponse.rewrite(new URL(pathname, req.url));
}
// Dynamic Pages Editor
if (pathname.match(/^\/course\/[^/]+\/activity\/[^/]+\/edit$/)) {
return NextResponse.rewrite(new URL(`/editor${pathname}`, req.url));