14 lines
433 B
TypeScript
14 lines
433 B
TypeScript
import type { NextRequest } from "next/server";
|
|
import { NextResponse } from "next/server";
|
|
|
|
export function middleware(request: NextRequest) {
|
|
// todo: make this redirect to the users profile if they have a profile selected
|
|
if (request.nextUrl.pathname == "/") {
|
|
return NextResponse.redirect(new URL("/search", request.url));
|
|
}
|
|
}
|
|
|
|
export const config = {
|
|
matcher: "/((?!api|_next/static|_next/image|favicon.ico).*)",
|
|
};
|