Issue #15: support https mode