]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/comments.pm
check site url for https
[ikiwiki.git] / IkiWiki / Plugin / comments.pm
index fcce6c5a6d131193a2a3b2932dc5a3b5778b0b66..cb0196728ef5652573df7d53a9ae509c4723877a 100755 (executable)
@@ -191,15 +191,17 @@ sub preprocess {
 
                eval q{use Libravatar::URL};
                if (! $@) {
+                       my $https=defined $config{url} && $config{url}=~/^https:/;
+
                        if (defined $commentopenid) {
                                eval {
-                                       $commentauthoravatar = libravatar_url(openid => $commentopenid, https => $ENV{HTTPS});
+                                       $commentauthoravatar = libravatar_url(openid => $commentopenid, https => $https);
                                }
                        }
                        if (! defined $commentauthoravatar &&
                            (my $email = IkiWiki::userinfo_get($commentuser, 'email'))) {
                                eval {
-                                       $commentauthoravatar = libravatar_url(email => $email, https => $ENV{HTTPS});
+                                       $commentauthoravatar = libravatar_url(email => $email, https => $https);
                                }
                        }
                }