Skip to content

Commit

Permalink
fix: add truthy param check to evaluation of urlSigning enabled (#422)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbudzins authored Jan 9, 2024
1 parent 111fcfb commit 527ca02
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/hooks/useContentProtection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import AccountController from '#src/stores/AccountController';
import GenericEntitlementService from '#src/services/genericEntitlement.service';
import JWPEntitlementService from '#src/services/jwpEntitlement.service';
import { getModule } from '#src/modules/container';
import { isTruthyCustomParamValue } from '#src/utils/common';

const useContentProtection = <T>(
type: EntitlementType,
Expand All @@ -24,7 +25,7 @@ const useContentProtection = <T>(
signingConfig: config.contentSigningService,
contentProtection: config.contentProtection,
jwp: config.integrations.jwp,
urlSigning: config?.custom?.urlSigning,
urlSigning: isTruthyCustomParamValue(config?.custom?.urlSigning),
}));
const host = signingConfig?.host;
const drmPolicyId = contentProtection?.drm?.defaultPolicyId ?? signingConfig?.drmPolicyId;
Expand Down

0 comments on commit 527ca02

Please sign in to comment.