Serving cgit via https and getting avatar via http gives error messages about untrusted content. This decides whether or not to use https link by looking at the environment variable HTTPS, which is set in CGI.