Skip to content

Commit 956b86d

Browse files
authored
1 parent 62da1cb commit 956b86d

File tree

1 file changed

+4
-1
lines changed
  • libs/providers/go-feature-flag-web/src/lib/controller

1 file changed

+4
-1
lines changed

libs/providers/go-feature-flag-web/src/lib/controller/goff-api.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ export class GoffApiController {
2222

2323
const request: DataCollectorRequest<boolean> = { events: events, meta: dataCollectorMetadata };
2424
const endpointURL = new URL(this.endpoint);
25-
endpointURL.pathname = 'v1/data/collector';
25+
const dataCollectorPath = 'v1/data/collector';
26+
endpointURL.pathname = endpointURL.pathname.endsWith('/')
27+
? endpointURL.pathname + dataCollectorPath
28+
: endpointURL.pathname + '/' + dataCollectorPath;
2629

2730
try {
2831
const headers: HeadersInit = {

0 commit comments

Comments
 (0)