Skip to content

Controller

isSecure()

isSecure() — returns boolean

Available in: controller Category: Miscellaneous Functions

Checks whether the current request is made over a secure connection (HTTPS). Returns true if the connection is secure, otherwise false.

1. Redirect non-secure connections to the secure version
if (!isSecure())
{
	redirectTo(protocol="https");
}