Skip to content

Commit

Permalink
Fix window.top.host cross origin issue when in nested iframes. (#1730)
Browse files Browse the repository at this point in the history
  • Loading branch information
bansawbanchee authored and matthewlane committed Oct 23, 2017
1 parent 505f7f3 commit f8bf197
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/sonobiBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var SonobiAdapter = function SonobiAdapter() {
var trinity = 'https://apex.go.sonobi.com/trinity.js?key_maker=';
var adSlots = request.bids || [];
var bidderRequestId = request.bidderRequestId;
var ref = (window.frameElement) ? '&ref=' + encodeURI(top.location.host || document.referrer) : '';
var ref = '&ref=' + encodeURI(utils.getTopWindowLocation().host);
adloader.loadScript(trinity + JSON.stringify(_keymaker(adSlots)) + '&cv=' + _operator(bidderRequestId) + ref);
}

Expand Down

0 comments on commit f8bf197

Please sign in to comment.