import { type NextMiddleware, NextResponse } from "next/server"

import { getDefaultRequestHeaders } from "./utils"

import type { MiddlewareMatcher } from "@/types/middleware"

export const middleware: NextMiddleware = async (request) => {
  const headers = getDefaultRequestHeaders(request)
  return NextResponse.next({
    headers,
  })
}

export const matcher: MiddlewareMatcher = (request) => {
  return request.nextUrl.pathname.includes("*")
}
