]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/bugs/http_proxy_for_openid.mdwn
po: remove all dependencies on nicepagetitle
[git.ikiwiki.info.git] / doc / bugs / http_proxy_for_openid.mdwn
1 If I try to authenticate using openid to my site, it tries to create a http or https connection to the openid server. This doesn't work, because the direct connection is blocked by the firewall.
3 It would be good if ikiwiki supported setting up a proxy server to solve this.
5 I have found if I add:
7     newenviron[i++]="HTTPS_PROXY=http://host.domain.com:3128";
9 to IkiWiki/Wrapper.pm it solves the problem for https requests, however it obviously would be preferred if the proxy name is not hard coded.
11 Also, the ability to set HTTPS\_CA\_FILE and HTTPS\_CA\_DIR might benefit some people. Then again, it I can't see any evidence that the SSL certificate of the server is being checked. See the [[bug_report|ssl_certificates_not_checked_with_openid]] I filed on this separate issue.
13 Unfortunately, HTTP\_PROXY doesn't work for http requests, it looks like that library is different.
15 ---
17 Update 2008-10-26:
19 Better solution, one that works for both http and https, and uses config options. It appears to work...
21 Note that using $ua->proxy(['https'], ...); won't work, you get a "Not Implemented" error, see <http://community.activestate.com/forum-topic/lwp-https-requests-proxy>. Also see [[!debbug 129528]].
23 Also note that the proxy won't work with liblwpx-paranoidagent-perl, I had to remove liblwpx-paranoidagent-perl first.
25 Please get the patch from the *.mdwn source.
27 louie:/usr/share/perl5/IkiWiki/Plugin# diff -u openid.pm.old openid.pm
28 --- openid.pm.old       2008-10-26 12:18:58.094489360 +1100
29 +++ openid.pm   2008-10-26 12:40:05.763429880 +1100
30 @@ -165,6 +165,14 @@
31                 $ua=LWP::UserAgent->new;
32         }
33  
34 +       if (defined($config{"http_proxy"})) {
35 +               $ua->proxy(['http'], $config{"http_proxy"});
36 +       }
37 +
38 +       if (defined($config{"https_proxy"})) {
39 +               $ENV{HTTPS_PROXY} = $config{"https_proxy"};
40 +       }
41 +
42         # Store the secret in the session.
43         my $secret=$session->param("openid_secret");
44         if (! defined $secret) {
47 Brian May