summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2011-03-30 11:00:55 -0400
committerJoey Hess <joey@kitenet.net>2011-03-30 11:00:55 -0400
commit51e8a4eeda24f0a2cfdb0e579ddf1e6df9972544 (patch)
tree7f2db4cf9b082efd34d06e6d5ad8e3e510699d77 /IkiWiki
parent5013e6b0bd379c93e7d8f545991762791b36ff1e (diff)
check site url for https
HTTPS won't be set when rebuilding a site at the command line
Diffstat (limited to 'IkiWiki')
-rwxr-xr-xIkiWiki/Plugin/comments.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm
index fcce6c5a6..cb0196728 100755
--- a/IkiWiki/Plugin/comments.pm
+++ b/IkiWiki/Plugin/comments.pm
@@ -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);
}
}
}