Updating helpers to return secure root when req is secure
Updating middleware to use new ssl setup in config