]> Sergey Matveev's repositories - public-inbox.git/commitdiff
examples/public-inbox.psgi: document ReverseProxy
authorEric Wong <e@80x24.org>
Sat, 13 Feb 2016 23:11:44 +0000 (23:11 +0000)
committerEric Wong <e@80x24.org>
Sat, 13 Feb 2016 23:12:06 +0000 (23:12 +0000)
Running behind a ReverseProxy is a popular deployment,
so document it for users.

examples/public-inbox.psgi

index 9fa51ba6b3583e27d3ab4c5ee5d48c6dad78868d..c4a8903e1639e2a101b2ea919058d0c9b2b7897e 100644 (file)
@@ -18,6 +18,12 @@ builder {
                        content_type => [ 'text/html', 'text/plain',
                                        'application/atom+xml' ];
        }
+
+       # Enable to ensure redirects and Atom feed URLs are generated
+       # properly when running behind a reverse proxy server which
+       # sets X-Forwarded-For and X-Forwarded-Proto request headers.
+       # See Plack::Middleware::ReverseProxy documentation for details
+       # enable 'ReverseProxy';
        enable 'Head';
        sub {
                my $req = Plack::Request->new(@_);