Skip to content

Commit

Permalink
Getting current window frames protocol, not assuming pub domain (#64)
Browse files Browse the repository at this point in the history
Merging since failing circleci issue is unrelated to this code change
  • Loading branch information
robertrmartinez authored and Isaac Dettman committed Jun 28, 2019
1 parent af1739e commit 8f47f4a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/renderingManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,11 @@ export function newRenderingManager(win, environment) {
* @param {string} pubUrl Url of publisher page
*/
function renderCrossDomain(adId, pubAdServerDomain = '', pubUrl) {
let windowLocation = window.location;
let parsedUrl = utils.parseUrl(pubUrl);
let publisherDomain = parsedUrl.protocol + '://' + parsedUrl.host;
let adServerDomain = (pubAdServerDomain !== '') ? pubAdServerDomain : GOOGLE_IFRAME_HOSTNAME;
let fullAdServerDomain = parsedUrl.protocol + '://' + adServerDomain;
let adServerDomain = pubAdServerDomain || GOOGLE_IFRAME_HOSTNAME;
let fullAdServerDomain = windowLocation.protocol + '//' + adServerDomain;

function renderAd(ev) {
let key = ev.message ? 'message' : 'data';
Expand Down

0 comments on commit 8f47f4a

Please sign in to comment.