Jump to content

Recommended Posts

Posted

I've renamed asyncspc.php to anothername.php. I've also modified the conf-file to reflect the name change (asyncspc=anothername.php). However, when looking at the asyncjs.php in a browser it still contains the old filename. It doesn't use the filename in the conf-file. It seems as if "asyncspsc.php" is hardcoded.

Bug?

Posted

Team there is  bug in MAX_commonConstructDeliveryUrl - as you can see it hard codes the http prefix rather than using the request header value.

In my case, this was the cause of a CORS issue meaning we couldn't serve async ads from an insecure website. I hard coded mine to be https but in the bugfix it should be updated to use the X-Forwarded-Proto  et al request headers and return the appropriate field. We lost 3 man days over this one!!! but glad to have it sorted.

/**
 * A function to generate the URL for delivery scripts.
 *
 * @param string $file The file name of the delivery script.
 * @return string The URL to the delivery script.
 */
function MAX_commonConstructDeliveryUrl($file)
{
        $conf = $GLOBALS['_MAX']['CONF'];

        return 'http://' . $conf['webpath']['delivery'] . '/' . $file;

}
 

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...