WordPress.org

Forums

WP-Piwik
[BUG] https/ssl testing error (2 posts)

  1. mampf
    Member
    Posted 10 months ago #

    Hi,

    you do use this code for testing if wer're on https:

    /**
     Check if SSL is used
    */
    private static function isSSL() {
        return (isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off');
    }

    This won't work on every host. In fact, this only works with mod_ssl. If you use pound (like uberspace), it just won't work, because these variables will never be set. You'd need to test %{ENV:HTTPS} instead.

    Anyway. Why not just use is_ssl provided by wordpress? This works!

    Thanks,
    Ben

    https://wordpress.org/plugins/wp-piwik/

  2. braekling
    Member
    Plugin Author

    Posted 10 months ago #

    Thank you. I will take account of this.

Reply

You must log in to post.

About this Plugin

  • WP-Piwik
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags