diff --git a/apps/api/src/utils/auth.ts b/apps/api/src/utils/auth.ts index 9eaf8535..ed648bc4 100644 --- a/apps/api/src/utils/auth.ts +++ b/apps/api/src/utils/auth.ts @@ -6,7 +6,10 @@ import { db } from '@openpanel/db'; import { logger } from './logger'; const cleanDomain = (domain: string) => - domain.replace('www.', '').replace(/https?:\/\//, ''); + domain + .replace('www.', '') + .replace(/https?:\/\//, '') + .replace(/\/$/, ''); export async function validateSdkRequest( headers: RawRequestDefaultExpression['headers']