1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-09 00:18:00 +01:00

fix: original url for uniqueness tracking (#9172)

This commit is contained in:
Mateusz Kwasniewski 2025-01-29 21:58:43 +01:00 committed by GitHub
parent 91d318a495
commit 07d4693f6d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -70,13 +70,13 @@ export function responseTimeMetrics(
const connectionId = const connectionId =
req.headers['x-unleash-connection-id'] || req.headers['x-unleash-connection-id'] ||
req.headers['unleash-instanceid']; req.headers['unleash-instanceid'];
if (req.url.includes('/api/client') && connectionId) { if (req.originalUrl.includes('/api/client') && connectionId) {
eventBus.emit(SDK_CONNECTION_ID_RECEIVED, { eventBus.emit(SDK_CONNECTION_ID_RECEIVED, {
connectionId, connectionId,
type: 'backend', type: 'backend',
}); });
} }
if (req.url.includes('/api/frontend') && connectionId) { if (req.originalUrl.includes('/api/frontend') && connectionId) {
eventBus.emit(SDK_CONNECTION_ID_RECEIVED, { eventBus.emit(SDK_CONNECTION_ID_RECEIVED, {
connectionId, connectionId,
type: 'frontend', type: 'frontend',