test: build HMAC tenant fixtures from domain, drop product URLs
HMAC identity tests should not hardcode gholak/montzar hosts. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -54,7 +54,7 @@ function hostsEqual(left: string, right: string): boolean {
|
||||
return left.replace(/^www\./, '') === right.replace(/^www\./, '');
|
||||
}
|
||||
|
||||
/** new.gholaktala.ir belongs to tenant domain gholaktala.ir — not via shared nodeServer. */
|
||||
/** new.shop.ir belongs to tenant domain shop.ir — not via shared nodeServer. */
|
||||
function isSubdomainOf(host: string, parent: string): boolean {
|
||||
const child = normalizeTenantHost(host);
|
||||
const root = normalizeTenantHost(parent).replace(/^www\./, '');
|
||||
@@ -66,8 +66,7 @@ export type TenantHostMatchMode = 'full' | 'hmac';
|
||||
|
||||
/**
|
||||
* full: get_user — دامنه، alias، app/admin/node.
|
||||
* hmac: فقط دامنهٔ اصلی نسخه (و سابدامنهٔ همان). adminUrl مشترک
|
||||
* (k.montzar.ir روی نسخهٔ app.gholaktala.ir) هویت نیست.
|
||||
* hmac: فقط دامنهٔ اصلی نسخه (و سابدامنهٔ همان). adminUrl هویت نیست.
|
||||
*/
|
||||
export function scoreTenantHost(
|
||||
tenant: TenantHostFields,
|
||||
|
||||
Reference in New Issue
Block a user