diff --git a/libs/providers/go-feature-flag-web/src/lib/controller/goff-api.ts b/libs/providers/go-feature-flag-web/src/lib/controller/goff-api.ts index 05a38dd7f..d1ce4f922 100644 --- a/libs/providers/go-feature-flag-web/src/lib/controller/goff-api.ts +++ b/libs/providers/go-feature-flag-web/src/lib/controller/goff-api.ts @@ -22,7 +22,10 @@ export class GoffApiController { const request: DataCollectorRequest = { events: events, meta: dataCollectorMetadata }; const endpointURL = new URL(this.endpoint); - endpointURL.pathname = 'v1/data/collector'; + const dataCollectorPath = 'v1/data/collector'; + endpointURL.pathname = endpointURL.pathname.endsWith('/') + ? endpointURL.pathname + dataCollectorPath + : endpointURL.pathname + '/' + dataCollectorPath; try { const headers: HeadersInit = {