Https awareness for 2.4

This implements https-awareness (so that the CAPTCHA will load in Chrome, for example) for the 2.4-compatible branch.