diff options
author | Eric Wong <e@80x24.org> | 2014-04-30 20:24:54 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2014-04-30 20:26:57 +0000 |
commit | d444d9aebc6e401333968ec697c48fb23214a1ea (patch) | |
tree | 3f75d98092ab82d3701b58f26b3962394e957580 /public-inbox.cgi | |
parent | f286304f47685f6530462439b95951e2af86051f (diff) | |
download | public-inbox-d444d9aebc6e401333968ec697c48fb23214a1ea.tar.gz |
These are probably still popular configurations in some settings, so include sample configurations to get folks started. These are trickier than an average CGI script to setup because we rely on pretty URLs from PATH_INFO and not ugly query parameters.
Diffstat (limited to 'public-inbox.cgi')
-rwxr-xr-x | public-inbox.cgi | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/public-inbox.cgi b/public-inbox.cgi index 56040676..3bc6eca3 100755 --- a/public-inbox.cgi +++ b/public-inbox.cgi @@ -15,10 +15,12 @@ use warnings; use PublicInbox::Config; use URI::Escape qw(uri_escape_utf8 uri_unescape); our $LISTNAME_RE = qr!\A/([\w\.\-]+)!; +our $NO_SCRIPT_NAME; # for prettier redirects with mod_perl2 our $pi_config; BEGIN { $pi_config = PublicInbox::Config->new; # TODO: detect and reload config as needed + $NO_SCRIPT_NAME = 1 if $ENV{NO_SCRIPT_NAME}; if ($ENV{MOD_PERL}) { require CGI; no warnings; @@ -36,6 +38,7 @@ if ($ENV{PI_PLACKUP}) { # so nuke it since CGI.pm functions without it. require CGI; delete $ENV{REQUEST_URI}; + $ENV{SCRIPT_NAME} = '' if $NO_SCRIPT_NAME; my $req = CGI->new; my $ret = main($req, $req->request_method); binmode STDOUT; |