16 lines
419 B
TypeScript
16 lines
419 B
TypeScript
import { NextResponse } from "next/server"
|
|
|
|
import { findLang } from "@/constants/languages"
|
|
|
|
import type { NextMiddleware } from "next/server"
|
|
|
|
import type { MiddlewareMatcher } from "@/types/middleware"
|
|
|
|
export const middleware: NextMiddleware = () => {
|
|
return new NextResponse("Not found", { status: 404 })
|
|
}
|
|
|
|
export const matcher: MiddlewareMatcher = (request) => {
|
|
return !findLang(request.nextUrl.pathname)
|
|
}
|