fix(analytics): use getBaseDomain for Profound host field (#3848)

request.url resolves to internal ALB hostname on ECS, not the public domain
This commit is contained in:
Waleed
2026-03-30 15:36:41 -07:00
committed by GitHub
parent e1359b09d6
commit 1d59eca90a

View File

@@ -8,6 +8,7 @@
import { createLogger } from '@sim/logger'
import { env } from '@/lib/core/config/env'
import { isHosted } from '@/lib/core/config/feature-flags'
import { getBaseDomain } from '@/lib/core/utils/urls'
const logger = createLogger('ProfoundAnalytics')
@@ -97,7 +98,7 @@ export function sendToProfound(request: Request, statusCode: number): void {
buffer.push({
timestamp: new Date().toISOString(),
method: request.method,
host: url.hostname,
host: getBaseDomain(),
path: url.pathname,
status_code: statusCode,
ip: