summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bugzilla/Quantum.pm12
1 files changed, 11 insertions, 1 deletions
diff --git a/Bugzilla/Quantum.pm b/Bugzilla/Quantum.pm
index e1cf94f2c..2519e23ad 100644
--- a/Bugzilla/Quantum.pm
+++ b/Bugzilla/Quantum.pm
@@ -34,6 +34,15 @@ sub startup {
$self->plugin('Bugzilla::Quantum::Plugin::Hostage');
$self->plugin('Bugzilla::Quantum::Plugin::BlockIP');
+ if ( $self->mode ne 'development' ) {
+ $self->hook(
+ after_static => sub {
+ my ($c) = @_;
+ $c->res->headers->cache_control('public, max-age=31536000');
+ }
+ );
+ }
+
my $r = $self->routes;
Bugzilla::Quantum::CGI->load_all($r);
Bugzilla::Quantum::CGI->load_one('bzapi_cgi', 'extensions/BzAPI/bin/rest.cgi');
@@ -47,9 +56,10 @@ sub startup {
$r->get(
'/__lbheartbeat__' => sub {
my $c = shift;
- $c->reply->file($c->app->home->child('__lbheartbeat__'));
+ $c->reply->file( $c->app->home->child('__lbheartbeat__') );
},
);
+
$r->get('/__heartbeat__')->to( 'CGI#heartbeat_cgi');
$r->get('/robots.txt')->to( 'CGI#robots_cgi' );