Added SSL support for this hook