netvillage Posted June 16, 2017 Report Posted June 16, 2017 New user running v4.0.2 running on Apache, PHP 5.5.12 and MySQL 5.6.17 Using the "Asynchronus JS Tag" my http calls (non-ssl), keep attempting to grab the image as https and the lg.php file as https. It works on one page (site), but another it fails (inside the ripple emulator for Phonegap, and also my phonegap app). works in IE. Here's the tag I am using where I hardcoded the http: (I don't want the slowdown from ssl) <ins data-revive-zoneid="1" data-revive-id="de77d907e60f2f4544b2c1842c4e97ea"></ins> <script async src="http://ads.xxxxxx.com/adserver/www/delivery/asyncjs.php"></script> Some notes: -If I use the regular "javascript tag" (the one with the document.writes) it works fine. -if I do alert(location.protocol); it is "http" -If I edit the file asyncspc.php and change the MAX_commonConstructSecureDeliveryUrl() function from https to http, that part works, so for some reason I'm thinking that big check at the top of the file ((!empty($_SERVER['SERVER_PORT ']) && !empty($GLOBALS['_MAX ']['CONF ']['openads ']['sslPort '])....etc) which sets "$GLOBALS['_MAX ']['SSL_REQUEST ']" somehow was invoked. Perhaps some default configuration settings? Quote
netvillage Posted June 17, 2017 Author Report Posted June 17, 2017 After putting some debug code in it seems https is getting set because $_SERVER['HTTP_X_FORWARDED_PROTO'] == "https" Now on to some research on why that is being set. Quote
netvillage Posted June 17, 2017 Author Report Posted June 17, 2017 So for someone coming along reading this, it looks like x-forwarded-protocol has something to do with load balancers. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Proto I'm not using one BUT I think my requests are being forwarded anyways. I am testing my Phonegap/cordova app using the Ripple browser plugin, I bet that does some forwarding. And when my app, built via phonegap build with hydration mode... I guess there's some forwarding there too. So my hacked solution for now is to update the setupConfigVariables() function, and set $GLOBALS['_MAX']['SSL_REQUEST'] = false; Guess I won't be able to do any SSL requests but I don't think I will anyways. andrewatfornax 1 Quote
andrewatfornax Posted June 27, 2017 Report Posted June 27, 2017 Hi @netvillage, Glad you got things figured out! Yes, based on that header, it looks like there's a proxy that is changing things to HTTPS by the time it arrives at Revive Adserver - but as you say, you can work around this, if you don't have access to change that proxy. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.