Fix session issues with use_https=true (#1488986)