Compare commits

...

2 Commits

Author SHA1 Message Date
hamid zarghami 1172e27879 Merge branch 'main' of https://git.danakcorp.com/danak/dkala-front
deploy to danak / build_and_deploy (push) Has been cancelled
2026-06-14 11:57:18 +03:30
hamid zarghami b7a046f59d domains 2026-06-14 11:56:25 +03:30
+4 -6
View File
@@ -1,9 +1,11 @@
import { NextResponse } from "next/server";
import type { NextRequest } from "next/server";
import { NextResponse } from "next/server";
// Map host → tenant path
const HOST_MAP: Record<string, string> = {
"avitaprotein.com": "/avita",
"boteflower.ir": "/boote",
"pedarprotein.ir": "/pedar",
// دامنه‌های جدید اینجا اضافه می‌شوند
};
@@ -18,11 +20,7 @@ export function middleware(req: NextRequest) {
const pathname = req.nextUrl.pathname;
// مسیرهای api و استاتیک را rewrite نکن
if (
pathname.startsWith("/api") ||
pathname.startsWith("/_next") ||
pathname.includes(".")
) {
if (pathname.startsWith("/api") || pathname.startsWith("/_next") || pathname.includes(".")) {
return NextResponse.next();
}