Now works with HTTPS as well