Now works both under HTTP and HTTPS.