Return if the request is sent via secure channel (https).
public getIsSecureConnection ( ) : boolean | ||
return | boolean | if the request is sent via secure channel (https) |
public function getIsSecureConnection(){ //FOR NODE BALANCER $_protocol = (isset($_SERVER['HTTP_X_FORWARDED_PROTO']))?$_SERVER['HTTP_X_FORWARDED_PROTO']:false; if($_protocol && $_protocol == "https"){ return true; } return parent::getIsSecureConnection(); }