diff --git a/.changeset/slow-melons-mix.md b/.changeset/slow-melons-mix.md new file mode 100644 index 00000000..ec66bef3 --- /dev/null +++ b/.changeset/slow-melons-mix.md @@ -0,0 +1,5 @@ +--- +"@theoplayer/cmcd-connector-web": patch +--- + +Fixed an issue where multiple CMCD query arguments were being added to the request URL. diff --git a/cmcd/src/TransmissionModeStrategies/QueryArgumentTransmissionModeStrategy.ts b/cmcd/src/TransmissionModeStrategies/QueryArgumentTransmissionModeStrategy.ts index 3dd7113d..3498c210 100644 --- a/cmcd/src/TransmissionModeStrategies/QueryArgumentTransmissionModeStrategy.ts +++ b/cmcd/src/TransmissionModeStrategies/QueryArgumentTransmissionModeStrategy.ts @@ -19,7 +19,7 @@ export class QueryArgumentTransmissionModeStrategy implements TransmissionModeSt const url = new URL(request.url); const parameters = transformToQueryParameters(payload); if (parameters) { - url.searchParams.append('CMCD', parameters); + url.searchParams.set('CMCD', parameters); request.redirect({ ...request, url: url.href