24 lines
529 B
Plaintext
24 lines
529 B
Plaintext
import { HttpTypes } from "@medusajs/types"
|
|
import { NextRequest, NextResponse } from "next/server"
|
|
|
|
const BACKEND_URL = process.env.NEXT_PUBLIC_MEDUSA_BACKEND_URL
|
|
const PUBLISHABLE_API_KEY = process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY
|
|
|
|
const regionMapCache = {
|
|
regionMap: new Map<string, HttpTypes.StoreRegion>(),
|
|
regionMapUpdated: Date.now(),
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* Middleware to handle region selection and onboarding status.
|
|
*/
|
|
export async function middleware(request: NextRequest) {
|
|
|
|
|
|
|
|
return NextResponse.next()
|
|
|
|
}
|