Airship\Engine\AutoPilot::forceHTTPS PHP Method

forceHTTPS() protected static method

Do not allow insecure HTTP request to proceed
protected static forceHTTPS ( string $scheme = '' ) : boolean
$scheme string
return boolean
    protected static function forceHTTPS(string $scheme = '') : bool
    {
        if (!self::isHTTPSConnection($scheme)) {
            // Should we redirect to an HTTPS endpoint?
            \Airship\redirect('https://' . $_SERVER['HTTP_HOST'] . '/' . $_SERVER['REQUEST_URI'], $_GET ?? []);
        }
        return true;
    }