Jump to content

https even though http


Recommended Posts

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?

 

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 weeks later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...