feat(SW-3197): Add required middleware and url to path in partner-sas * Add url to path and required middleware Approved-by: Matilda Landström
17 lines
439 B
TypeScript
17 lines
439 B
TypeScript
import { type NextMiddleware, NextResponse } from "next/server"
|
|
|
|
import { getDefaultRequestHeaders } from "./utils"
|
|
|
|
import type { MiddlewareMatcher } from "./types"
|
|
|
|
export const middleware: NextMiddleware = async (request) => {
|
|
const headers = getDefaultRequestHeaders(request)
|
|
return NextResponse.next({
|
|
headers,
|
|
})
|
|
}
|
|
|
|
export const matcher: MiddlewareMatcher = (request) => {
|
|
return request.nextUrl.pathname.includes("*")
|
|
}
|