diff options
author | Joey Hess <joey@kitenet.net> | 2011-03-30 11:00:55 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-03-30 11:00:55 -0400 |
commit | 51e8a4eeda24f0a2cfdb0e579ddf1e6df9972544 (patch) | |
tree | 7f2db4cf9b082efd34d06e6d5ad8e3e510699d77 /IkiWiki/Plugin | |
parent | 5013e6b0bd379c93e7d8f545991762791b36ff1e (diff) | |
download | ikiwiki-51e8a4eeda24f0a2cfdb0e579ddf1e6df9972544.tar ikiwiki-51e8a4eeda24f0a2cfdb0e579ddf1e6df9972544.tar.gz |
check site url for https
HTTPS won't be set when rebuilding a site at the command line
Diffstat (limited to 'IkiWiki/Plugin')
-rwxr-xr-x | IkiWiki/Plugin/comments.pm | 6 |
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); } } } |