Commit fe594d4e authored by Luc Didry's avatar Luc Didry

Add cache control header to static file rendering

parent e81b218e
Pipeline #9753 passed with stage
in 3 minutes and 48 seconds
......@@ -180,6 +180,10 @@ sub startup {
}
}
);
$self->hook(after_static => sub {
my $c = shift;
$c->res->headers->cache_control('max-age=2592000, must-revalidate');
});
# For the first launch (after, this isn't really useful)
$self->provisioning();
......
......@@ -27,6 +27,10 @@ sub startup {
}
push @{$self->static->paths}, $self->home->rel_dir('themes/default/public');
$self->hook(after_static => sub {
my $c = shift;
$c->res->headers->cache_control('max-age=2592000, must-revalidate');
});
$self->plugin('Mount' => {$config->{prefix} => File::Spec->catfile($Bin, '..', 'script', 'application')});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment