Hello,
I detected this in one installation of mine. The thing is very simple: when you have a secure proxy server in front of your application server, both exchanging data through port 80, the way it tries to get the configuration about https use (via $GLOBALS) won't work, since for the application server the port is still 80. As the front-end server is using SSL port to transmit data to visitants, we get the mixed content error when loading gpt.js library file (because it tries to get it from -> http://www.googletagservices.com, not https://), and nothing works.
My proposed solution is to change at line 684 from dfp.module file, from:
drupal_add_js(($GLOBALS['is_https'] ? "https://" : "http://") . DFP_GOOGLE_TAG_SERVICES_URL, $options);
to
drupal_add_js("//" . DFP_GOOGLE_TAG_SERVICES_URL, $options);
letting it free to the users' browser to match the protocol.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | dfp-https-behind-proxy-2825725-3-D7.patch | 618 bytes | Patrick Ryan |
Comments
Comment #2
Vuds commentedComment #3
Patrick Ryan commentedI can confirm this is an issue. The solution suggested above is correct - here's a patch for it. Tested on AWS instances behind a proxy.
Comment #4
camerongreen commentedI had this issue as well, agree with the fix. Will try something like this in the meantime:
Comment #5
bleen commented@camerongreen, have you tried the patch in #3? If so, can you report back success or failure. I think its a perfectly good solution but Id like someone to test and mark this issue as RTBC before merging it in.
Comment #6
camerongreen commented@bleen our module had other patches applied to it, so the above fix was manually applied and it fixed the problem. So I can't verify the patch, but I can verify that what it is intended to do works well.
With the recent sec advisory about the module, I needed to upgrade it so I'm moving patches out into hooks as per my message above. Stops me having to reapply them on upgrades etc.
Comment #7
acrosmanThe patch from #3 applied cleaning and worked for me. Patch itself seems simple enough and should solve the problem reliably.
Comment #8
dpi+1 RTBC.
Resolved a Cloudfront issue.
Comment #10
bleen commented