diff --git a/www/index.pl b/www/index.pl index c02db7d..7be242e 100755 --- a/www/index.pl +++ b/www/index.pl @@ -44,6 +44,16 @@ TUWF::set( ); +TUWF::hook before => sub { + if(tuwf->{_TUWF}{http}) { + if(tuwf->resFile("$ROOT/www", tuwf->reqPath)) { + tuwf->resHeader('Cache-Control' => 'max-age=31536000'); + tuwf->done; + } + } +}; + + TUWF::register( qr// => \&home, qr{info/about} => \&about,