]> Sergey Matveev's repositories - public-inbox.git/commitdiff
psgi: enable ReverseProxy middleware by default
authorEric Wong <e@80x24.org>
Fri, 26 Feb 2016 09:15:36 +0000 (09:15 +0000)
committerEric Wong <e@80x24.org>
Fri, 26 Feb 2016 09:15:36 +0000 (09:15 +0000)
ReverseProxy is the common way to run Perl applications,
so enable it by default and don't care too much about fake
requests because we don't handle any sensitive information
or rely on authentication (everything is read-only from
the WWW interface and will remain so).

examples/public-inbox.psgi
public-inbox-httpd

index e3e421526125a25f670205ab54a024953ad14d4b..acceba3deace399b6b801720600bc0e814301fcd 100644 (file)
@@ -23,7 +23,8 @@ builder {
        # 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
        # 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 'ReverseProxy';
+
        enable 'Head';
        sub { $www->call(@_) };
 }
        enable 'Head';
        sub { $www->call(@_) };
 }
index b871e3de067353f84b210c2fc1f1948e665783f1..6109af01a62cdad79fdd11a3bdeea9652033f94d 100644 (file)
@@ -35,6 +35,7 @@ my $refresh = sub {
                                        enable 'Deflater',
                                                content_type => $deflate_types
                                }
                                        enable 'Deflater',
                                                content_type => $deflate_types
                                }
+                               enable 'ReverseProxy';
                                enable 'Head';
                                sub { $www->call(@_) };
                        };
                                enable 'Head';
                                sub { $www->call(@_) };
                        };