@twin.org/dataspace-control-plane-service 0.9.1-next.6 → 0.9.1-next.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -192,7 +192,7 @@ export class DataspaceControlPlaneService {
192
192
  this._trustComponent = ComponentFactory.get(options?.trustComponentType ?? "trust");
193
193
  this._overrideTrustGeneratorType = options?.config?.overrideTrustGeneratorType;
194
194
  this._dataPlanePath = Is.stringValue(options?.config?.dataPlanePath)
195
- ? StringHelper.trimTrailingSlashes(StringHelper.trimLeadingSlashes(options.config.dataPlanePath))
195
+ ? StringHelper.trimLeadingAndTrailingSlashes(options.config.dataPlanePath)
196
196
  : undefined;
197
197
  this._callbackPath = Is.stringValue(options?.config?.callbackPath)
198
198
  ? StringHelper.trimLeadingAndTrailingSlashes(options.config.callbackPath)
@@ -560,12 +560,7 @@ export class DataspaceControlPlaneService {
560
560
  // Callback the provider POSTs DSP messages back to: mount path + `?organization=` so the inbound
561
561
  // POST routes to the right consumer tenant (mirrors buildCallbackUrl). The bare `origin` is kept for
562
562
  // the PUSH-inbox base below (a different mount).
563
- let callbackAddress = Is.stringValue(this._callbackPath)
564
- ? `${origin}/${this._callbackPath}`
565
- : origin;
566
- if (Is.stringValue(organizationIdentity)) {
567
- callbackAddress = HttpUrlHelper.addQueryStringParam(callbackAddress, ContextIdKeys.Organization, organizationIdentity);
568
- }
563
+ const callbackAddress = HttpUrlHelper.addQueryStringParam(Is.stringValue(this._callbackPath) ? `${origin}/${this._callbackPath}` : origin, ContextIdKeys.Organization, organizationIdentity);
569
564
  const transferRequestMessage = {
570
565
  "@context": [DataspaceProtocolContexts.Context],
571
566
  "@type": DataspaceProtocolTransferProcessTypes.TransferRequestMessage,