added support for custom https security