Support » Plugin: Infusionsoft Gravity Forms Add-on » Plugin breaks on SSL

  • Resolved robertcalise


    On Line 1059 of infusionsoft.php, there is a call to bloginfo() that outputs the admin-ajax link (used when setting up the form to tap into).

    However, in SSL-protected environments, this appears to fail. A simple is_ssl() call (or something a bit more complex, to accommodate load balancers/nginx) would fix this issue.

    var mysack = new sack("<?php bloginfo( 'wpurl' ); ?>/wp-admin/admin-ajax.php" );

    Could become something like:

    <?php $domain = get_bloginfo('wpurl');
      if(is_ssl || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')) {
      $domain = str_replace('http://', 'https://', $domain);
    var mysack = new sack("<?php echo $domain; ?>/wp-admin/admin-ajax.php");

Viewing 1 replies (of 1 total)
  • Plugin Contributor Zack Katz


    I’ll add this in, thanks for letting me know. It uses admin_url(), which uses set_url_scheme() to determine the current http / https scheme.

Viewing 1 replies (of 1 total)
  • The topic ‘Plugin breaks on SSL’ is closed to new replies.