Support » Plugin: WP-Piwik » [BUG] https/ssl testing error

  • 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!


Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[BUG] https/ssl testing error’ is closed to new replies.