From 3fcb920dbb45fe9c53fd6c1475a6a007e7c0ce48 Mon Sep 17 00:00:00 2001 From: Dave Cross Date: Mon, 12 Aug 2024 09:10:35 +0100 Subject: [PATCH] Take two --- Succession/bin/app.psgi | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Succession/bin/app.psgi b/Succession/bin/app.psgi index bd568d7..9150c63 100755 --- a/Succession/bin/app.psgi +++ b/Succession/bin/app.psgi @@ -10,6 +10,7 @@ use Succession; use DateTime; use DateTime::Format::HTTP; +use FindBin '$RealBin'; my $thirty_days = DateTime::Format::HTTP->format_datetime(DateTime->now->add(days => 30)); @@ -17,8 +18,8 @@ builder { enable 'Headers', when => ['Content-Type' => qr{^text/css}], set => ['Expires' => $thirty_days, 'Cache-Control' => 'max-age=2592000']; -# enable 'Static', -# path => qr{^/(images|css)/}, -# root => './public/'; + enable 'Static', + path => qr{^/(images|css)/}, + root => "$RealBin/../public/"; Succession->to_app; }