X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;ds=sidebyside;f=examples%2Fpublic-inbox.psgi;h=b0b9ae9850bd9620937a15dff753df152588d0df;hb=e2ed3be62fbb53e16a9248a408a7a069a05842e6;hp=1de5bb7daec73120aa1502905dd2559b2c6cbb26;hpb=aad65bb344ebca758940e1129b5604aba1e20eee;p=public-inbox.git diff --git a/examples/public-inbox.psgi b/examples/public-inbox.psgi index 1de5bb7d..b0b9ae98 100644 --- a/examples/public-inbox.psgi +++ b/examples/public-inbox.psgi @@ -9,10 +9,14 @@ use PublicInbox::WWW; PublicInbox::WWW->preload; use Plack::Request; use Plack::Builder; +my $have_deflater = eval { require Plack::Middleware::Deflater; 1 }; + builder { - enable "Deflater", - content_type => [ 'text/html', 'text/plain', - 'application/atom+xml' ]; + if ($have_deflater) { + enable "Deflater", + content_type => [ 'text/html', 'text/plain', + 'application/atom+xml' ]; + } enable "Head"; sub { my $req = Plack::Request->new(@_);