You are here

public static function Server::isSSL in Anti Spam by CleanTalk 8.4

Same name and namespace in other branches
  1. 9.1.x src/lib/Cleantalk/Common/Variables/Server.php \Cleantalk\Common\Variables\Server::isSSL()

Determines if SSL is used.

Return value

bool True if SSL, otherwise false.

1 call to Server::isSSL()
Server::getHomeURL in src/lib/Cleantalk/Common/Variables/Server.php

File

src/lib/Cleantalk/Common/Variables/Server.php, line 103

Class

Server
Class Server Wrapper to safely get $_SERVER variables

Namespace

Cleantalk\Common\Variables

Code

public static function isSSL() {
  if (self::get('HTTPS') === 'on' || self::get('HTTPS') === '1' || self::get('SERVER_PORT') == '443') {
    return true;
  }
  return false;
}