WordPress.org

Ready to get started?Download WordPress

Forums

WordPress HTTPS (SSL)
Modified for CloudFlare (10 posts)

  1. Spencer Tomosvary
    Member
    Posted 2 years ago #

    Hi, I modded a function in your plugin to work with CloudFlares SSL, so you might consider including this functionality in future releases.. (Credit goes to Gravity Forms for a snippet of code here)

    Here you go:

    public function is_ssl() {
    $https_url = parse_url($this->https_url);
    // Some extra checks for proxies and Shared SSL
    if ( is_ssl() && strpos($_SERVER['HTTP_HOST'], $https_url['host']) === false && $_SERVER['SERVER_ADDR'] != $_SERVER['HTTP_HOST'] ) {
    return false;
    } else if ( isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https' ) {
    return true;
    } else if ( $this->diff_host && !is_ssl() && isset($_SERVER['HTTP_X_FORWARDED_SERVER']) && strpos($this->https_url, 'https://' . $_SERVER['HTTP_X_FORWARDED_SERVER']) !== false ) {
    return true;
    }
    elseif ( isset($_SERVER["HTTP_CF_VISITOR"]) && strpos($_SERVER["HTTP_CF_VISITOR"], "https")){
    return true;
    } else if ( $this->diff_host && !is_ssl() && strpos($_SERVER['HTTP_HOST'], $https_url['host']) !== false && (!$this->ssl_port || $_SERVER['SERVER_PORT'] == $this->ssl_port) && (isset($https_url['path']) && !$https_url['path'] || strpos($_SERVER['REQUEST_URI'], $https_url['path']) !== false) ) {
    return true;
    }
    return is_ssl();
    }

    http://wordpress.org/extend/plugins/wordpress-https/

  2. AngieP
    Member
    Posted 2 years ago #

    Greetings,

    We would be very interested in seeing this implemented.
    Lets hope Mvied will come out with the new version of this great plugin!

    Angie
    http://angiesdiary.com/

  3. Mvied
    Member
    Plugin Author

    Posted 2 years ago #

    I just pushed out version 3.0 which may or may not fix this. I ended up taking a more generic route for detecting proxies. Please try updating and let me know if you need any help.

    Sorry for the late response. I have not had time to support the plugin for a while now. Since I just pushed out 3.0, I'll be keeping an eye on the support forums to fix any bugs that arise.

    Thanks,
    Mike

  4. AngieP
    Member
    Posted 2 years ago #

    Thank you for the update, Mike!

    We shall certainly give it a try. Any idea when (and where) it will be available for us, mere mortals? Or should we just wait until WordPress will inform us of your updated version?

    Warm wishes,
    Angie

    http://angiesdiary.com/

  5. Mvied
    Member
    Plugin Author

    Posted 2 years ago #

    Hey Angie,

    I actually pushed it out last night (hence the previous post) but realized that I hadn't tested in PHP 5.2.4 and it was broken! If you're using PHP 5.3+, you can grab a copy under Other Versions. Just look for the link to 3.0. After work I'll be working on fixes and will hopefully push it out again.

    Thanks,
    Mike

  6. Mvied
    Member
    Plugin Author

    Posted 2 years ago #

    Does the most current version of the plugin work with CloudFlare?

  7. AngieP
    Member
    Posted 2 years ago #

    Hello Mike,

    Thanks for asking, I know you've been very busy!
    Unfortunately I'm again getting endless loops (as opposed to pages being redirected to the homepage, in the previous version). This does not mean that your plugin is the culprit.

    Tomorrow we are X-raying our database, with a top-level WP engineer. I'm sure that after that session I'll have a clearer idea and be able to give you more professional feedback.

    Your help is great and much appreciated,
    X Angie

  8. Mvied
    Member
    Plugin Author

    Posted 2 years ago #

    Hey Angie,

    I recently found out that Better WP Security is copying some of the functionality my plugin provides, so I've had issues with it interfering. That's the only plugin incompatibility I know about.

    If you have any questions about the plugin, let me know.

    Thanks,
    Mike

  9. AngieP
    Member
    Posted 2 years ago #

    Hi Mike,

    We do not use Better WP Security.
    I'll report tomorrow about our findings on the database settings (wp_options mainly). The key to our issue might be there.

    Thanks again.

    Cheers,
    Angie

  10. marhgil
    Member
    Posted 2 years ago #

    FYI, Here's how I was able to setup Cloudflare's Flexible SSL and WordPress HTTPS plugin properly. No infinite redirect loop errors anymore.

    http://www.macuha.com/2012/05/wordpress/how-to-setup-ssl-on-wordpress-admin-using-cloudflare-flexible-ssl/

    Hope this helps.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic