Skip to content

Commit

Permalink
fix(FEC-14049): Send referrer only if it came from iFrame embed (#242)
Browse files Browse the repository at this point in the history
### Description of the Changes

In case of iframe embed, the BE adds a parameter to the bundle
window.originalRequestReferrer, this value will be added to api calls
from the player to the backend for evaluation of access control request.
If the PR is related to an open issue please link to it.

Issue:
The decision when to send it with API calls to the backend needs to be
based if it was supplied in origin

Fix:
Send the referrer to the provider only if it was supplied by the backend

Resolves
FEC-[https://kaltura.atlassian.net/browse/[FEC-14049](https://kaltura.atlassian.net/browse/FEC-14049)]
  • Loading branch information
MosheMaorKaltura authored Jul 22, 2024
1 parent 5432c2a commit 46c81fb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/k-provider/ovp/services/base-entry-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ export default class OVPBaseEntryService extends OVPService {
request.method = 'POST';
request.url = request.getUrl(serviceUrl);
request.tag = 'baseEntry-getPlaybackContext';
const contextDataParams = {objectType: 'KalturaContextDataParams', flavorTags: 'all', referrer};
const contextDataParams = {objectType: 'KalturaContextDataParams', flavorTags: 'all'};
if (referrer) {
contextDataParams['referrer'] = referrer;
}
request.params = {entryId: serviceEntryId, ks: ks, contextDataParams: contextDataParams};
return request;
}
Expand Down

0 comments on commit 46c81fb

Please sign in to comment.