Controller
isSecure()
Signature
Section titled “Signature”isSecure() — returns boolean
Available in: controller
Category: Miscellaneous Functions
Description
Section titled “Description”Checks whether the current request is made over a secure connection (HTTPS). Returns true if the connection is secure, otherwise false.
Examples
Section titled “Examples”1. Redirect non-secure connections to the secure version
if (!isSecure())
{
redirectTo(protocol="https");
}