From: Emil Williams Date: Thu, 8 May 2025 04:24:57 +0000 (-0600) Subject: -- X-Git-Url: https://git.xolatile.top/?a=commitdiff_plain;h=cc1ce8c754179259c19940fcb77a285a6213a6f1;p=emil-3chen.org.git -- --- diff --git a/perl/Triple.pm b/perl/Triple.pm index 8532ebe..606c737 100644 --- a/perl/Triple.pm +++ b/perl/Triple.pm @@ -22,7 +22,7 @@ use constant { our %page = ( '' => [ STATIC_PAGE, '404', '404 Not Found', '404 Not Found' ], - '/' => [ STATIC_PAGE, 'index', 'Chendex', 'Forum Index' ], + '/' => [ STATIC_PAGE, 'index', 'Chendex', 'Forum Index' ], '/+/' => [ DYNAMIC_PAGE, 'img', '+', 'General Discussion Board' ], '/sys/' => [ DYNAMIC_PAGE, 'img', 'System', 'Site Info' ], ); @@ -40,16 +40,21 @@ sub Triple::main { my $cgi = CGI->new; my $vars = { - + ip => $ENV{'REMOTE_ADDR'} || '?', + uri => $ENV{'REQUEST_URI'} // '/', }; - my $path = $ENV{'REQUEST_URI'} // '/'; - print $cgi->header( -Content_Type => 'text/html', -charset => 'UTF-8', ); - print %static{$path} // %static{''}; + + $page = %static{$vars->{uri}}; + if (not $page) { + + $page = %static{''}; + } + print $page; } }