2 # Copyright (C) 2014-2015 all contributors <meta@public-inbox.org>
3 # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
4 # Note: this is part of our test suite, update t/plack.t if this changes
5 # Usage: plackup [OPTIONS] /path/to/this/file
9 PublicInbox::WWW->preload;
12 my $have_deflater = eval { require Plack::Middleware::Deflater; 1 };
13 my $www = PublicInbox::WWW->new;
18 content_type => [ 'text/html', 'text/plain',
19 'application/atom+xml' ];
22 # Enable to ensure redirects and Atom feed URLs are generated
23 # properly when running behind a reverse proxy server which
24 # sets X-Forwarded-For and X-Forwarded-Proto request headers.
25 # See Plack::Middleware::ReverseProxy documentation for details
26 # enable 'ReverseProxy';
28 sub { $www->call(@_) };