From fe407fe3ec01deba81a6eee896699c65a0566426 Mon Sep 17 00:00:00 2001 From: Yorhel Date: Wed, 6 Dec 2017 21:16:19 +0100 Subject: Add instructions for running VNDB as standalone web server --- util/vndb.pl | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'util/vndb.pl') diff --git a/util/vndb.pl b/util/vndb.pl index b91aac56..46ff9e0d 100755 --- a/util/vndb.pl +++ b/util/vndb.pl @@ -50,6 +50,14 @@ TUWF::run(); sub reqinit { my $self = shift; + # If we're running standalone, serve www/ and static/ too. + if($TUWF::OBJ->{_TUWF}{http}) { + if($self->resFile("$ROOT/www", $self->reqPath) || $self->resFile("$ROOT/static", $self->reqPath)) { + $self->resHeader('Cache-Control' => 'max-age=31536000'); + return 0; + } + } + # check authentication cookies $self->authInit; -- cgit v1.2.3