From 33d34fa679da1e86a953694f553a8d246538efcb Mon Sep 17 00:00:00 2001 From: swaggboi Date: Fri, 12 Mar 2021 20:07:57 -0500 Subject: [PATCH] Implement placeholder (will make session cookies easier later) --- public/Pictures/Simple_book.gif | Bin 0 -> 739 bytes www-swagg.pl | 23 +++++++++++------------ 2 files changed, 11 insertions(+), 12 deletions(-) create mode 100644 public/Pictures/Simple_book.gif diff --git a/public/Pictures/Simple_book.gif b/public/Pictures/Simple_book.gif new file mode 100644 index 0000000000000000000000000000000000000000..51a2855019cf6af5daa5f92d6c4a5bdbf73f2c42 GIT binary patch literal 739 zcmZ?wbhEHbRArE3n8?Hc1poj42T=?RivPL&TtkAL9RpmA^bD98K|()SSVb6^7<54L zAT10`Gp6*fJpGn`@tiHUvK#Kn%;B?(a+tP^eMZ&-!{lA_KJL_fdE#Eo&v%yD$_LYQ z7HybzVP%c?9l;qQQr&KT7b=f@o3mbFs>Phh#XHtk9Nt}d*zj9cPr#)MXA8`KiTXdB zf4|={d|BJ`ZClz!o=^X_EZKa0IQI31_)oK!ftI3G?3|YZL!zo$cWpkE zb(w2-)y2lZ-vLOD6=h&%;A9X3I#zxP>&$5n7v5tIy7Wr#+SKSdjT2t@KH;2}*p;U# z?i37}+OE>)i96v@uva0@<_EfhpFs-f3b&TNnF+6$oT@eaxSEfs=bdO-lvZ)ebDr9&O+6;Fw6!lj znfcQC!UE8WYI%1nj2`eFxY6HDgB)c zucU7jE8H+!*!%O!S;;dVbqUE$(|2u(US%XGxwGKSv7+whrFx71Ryo|yK4LAIuaoj= zt4UmjkD5qCp>Hza8akZ*hGXs&Li4$mnDA)pDaGK&-RKw9ytt={*T;Q?jNo7KK z+RN>ma?^SlXI=UlJt-^u`45@PUt{*%cmE+JRKF`yX!)AXIY-q^I=b9e9@7liW-Pb; MzTin6O$G*Q0313TJ^%m! literal 0 HcmV?d00001 diff --git a/www-swagg.pl b/www-swagg.pl index b86eb45..b758b1b 100755 --- a/www-swagg.pl +++ b/www-swagg.pl @@ -8,11 +8,9 @@ use Regexp::Common qw{net}; use Digest::SHA qw{sha1_hex}; use Number::Format qw{format_number}; -# guest.cgi script -plugin CGI => ['/cgi-bin/guest' => './cgi-bin/guest_mm.cgi']; - -# whoami.cgi script -plugin CGI => ['/cgi-bin/whoami' => './cgi-bin/whoami.cgi']; +# CGI scripts +plugin CGI => ['/cgi-bin/guest' => './cgi-bin/guest_mm.cgi']; +plugin CGI => ['/cgi-bin/whoami' => './cgi-bin/whoami.cgi' ]; # The main landing page; pass in the output of the fortune command get '/' => sub { @@ -28,13 +26,6 @@ get '/' => sub { $c->render(); } => 'index'; -# Deprecation of IE page -get '/die'; - -get '/me'; - -get '/news'; - # Process mac address to ula6 ala the ol' ula6.cgi script: # - Current time of day in 64-bit NTP format # - Obtain EUI64 @@ -87,5 +78,13 @@ get '/ula6' => sub { $c->render(ula6 => $ula6); }; +# Catch any other route +get '/:route' => sub { + my ($c) = @_; + my $route = $c->stash('route'); + + $c->render(template => $route); +}; + # Send it app->start();