public function enable() {
    if ($this->detectHttps() === true) {
      header('Strict-Transport-Security: max-age='.$this->maxAge);
    } else {
      header('Location: https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'], true, 301);
      /* Prevent further execution and output. */
      die();
    }
  }
public function enable() {
    if ($this->detectHttps() === true) {
      header('Strict-Transport-Security: max-age='.$this->maxAge);
    } else {
      header('Location: https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'], true, 301);
      /* Prevent further execution and output. */
      die();
    }
  }
public function enable ( ) { if ( $ this -> detectHttps ( ) === true ) { header ( 'Strict-Transport-Security: max-age=' . $ this -> maxAge ) ; } else { header ( 'Location: https://' . $ _SERVER [ 'HTTP_HOST' ] . $ _SERVER [ 'REQUEST_URI' ] , true , 301 ) ; /* Prevent further execution and output. */ die ( ) ; } }
Enables HSTS.
Enables HSTS .