]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
check site url for https
authorJoey Hess <joey@kitenet.net>
Wed, 30 Mar 2011 15:00:55 +0000 (11:00 -0400)
committerJoey Hess <joey@kitenet.net>
Wed, 30 Mar 2011 15:00:55 +0000 (11:00 -0400)
HTTPS won't be set when rebuilding a site at the command line

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);
                                }
                        }
                }