diff --git a/apps/dashboard/middleware.ts b/apps/dashboard/middleware.ts index 1d261b6..2a9af08 100644 --- a/apps/dashboard/middleware.ts +++ b/apps/dashboard/middleware.ts @@ -8,7 +8,7 @@ import { NextRequest, NextResponse } from "next/server" * - Skips for the shared fallback host `tenant.reparee.com` and any non-tenant * host (apex, localhost, preview URLs). * - For a tenant subdomain, HMAC-signs the subdomain and calls SaaS - * `GET /api/saas/workspaces/by-subdomain/` to resolve to + * `GET /api/v1/saas/workspaces/by-subdomain/` to resolve to * { workspace_uuid, api_base_url }, then sets those as HttpOnly cookies. * * Matcher excludes /api/proxy/* (proxy needs no resolution; cookies already set) @@ -47,7 +47,7 @@ export async function middleware(req: NextRequest) { try { const signature = await hmacSha256Hex(sub, secret) - const resolveUrl = `${saasUrl.replace(/\/$/, "")}/api/saas/workspaces/by-subdomain/${encodeURIComponent(sub)}` + const resolveUrl = `${saasUrl.replace(/\/$/, "")}/api/v1/saas/workspaces/by-subdomain/${encodeURIComponent(sub)}` const res = await fetch(resolveUrl, { headers: { "X-SaaS-Signature": signature, Accept: "application/json" }, cache: "no-store",