Add HTTPs support and add /stats/ to prevent interference