From a43dd4a4fa86278f0fa5ced79b11299e43f37628 Mon Sep 17 00:00:00 2001 From: Leon Ho Date: Wed, 1 Mar 2017 16:49:43 -0800 Subject: [PATCH] OpenX Adapter: Correctly gets the page domain for cross-domain iframes --- src/adapters/openx.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/adapters/openx.js b/src/adapters/openx.js index 21c5ba3476d..54114b7e7de 100644 --- a/src/adapters/openx.js +++ b/src/adapters/openx.js @@ -196,7 +196,8 @@ const OpenxAdapter = function OpenxAdapter() { function callBids(params) { let isIfr, bids = params.bids || [], - currentURL = window.location.href && encodeURIComponent(window.location.href); + currentURL = (window.parent !== window) ? document.referrer : window.location.href; + currentURL = currentURL && encodeURIComponent(currentURL); try { isIfr = window.self !== window.top; }