X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=blobdiff_plain;f=public-inbox-httpd;h=6109af01a62cdad79fdd11a3bdeea9652033f94d;hp=772333e8b0a49a084f14853c6ae9c5a27796473f;hb=ac6f7081a484a053ddb60a2f8b6b6487664827ac;hpb=92caa961d72bbb4a6e739b8a50927e62aa3a3e8f diff --git a/public-inbox-httpd b/public-inbox-httpd index 772333e8..6109af01 100644 --- a/public-inbox-httpd +++ b/public-inbox-httpd @@ -8,13 +8,9 @@ use warnings; use Plack::Util; use PublicInbox::Daemon; use PublicInbox::HTTP; -use PublicInbox::WWW; use Plack::Request; use Plack::Builder; -PublicInbox::WWW->preload; -my $have_deflater = eval { require Plack::Middleware::Deflater; 1 }; my %httpds; -my $config; my $app; my $refresh = sub { if (@ARGV) { @@ -24,6 +20,8 @@ my $refresh = sub { "$0 runs in /, command-line paths must be absolute\n"; } } else { + require PublicInbox::WWW; + PublicInbox::WWW->preload; my $www = PublicInbox::WWW->new; $app = eval { my $deflate_types = eval { @@ -37,6 +35,7 @@ my $refresh = sub { enable 'Deflater', content_type => $deflate_types } + enable 'ReverseProxy'; enable 'Head'; sub { $www->call(@_) }; };