]> iEval git - gruntmaster-page.git/commitdiff
Return a 404 for robots.txt and favicon.ico
authorMarius Gavrilescu <marius@ieval.ro>
Fri, 20 Feb 2015 12:08:18 +0000 (14:08 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Fri, 20 Feb 2015 12:08:18 +0000 (14:08 +0200)
lib/Plack/App/Gruntmaster.pm

index 2edc6dc2999daa3cbb9006cb3954e25b48fe4ada..edf19110c3e89f1fca0d39f9db533a83b50bbee2 100644 (file)
@@ -53,7 +53,7 @@ use constant FORMAT_EXTENSION => {
        SBCL => 'l',
 };
 
-use constant NOT_FOUND => [404, ['Content-Type' => 'text/plain'], ['Not found']];
+use constant NOT_FOUND => [404, ['X-Forever' => 1, 'Content-Type' => 'text/plain'], ['Not found']];
 use constant FORBIDDEN => [401, ['Content-Type' => 'text/plain', 'WWW-Authenticate' => 'Basic realm="Gruntmaster 6000"'], ['Forbidden']];
 
 sub development() { ($ENV{PLACK_ENV} // 'development') eq 'development' }
@@ -115,6 +115,9 @@ sub dispatch_request{
                        [200, \@headers, [development ? $js : JavaScript::Minifier::XS::minify $js]]
                },
 
+               sub (/robots.txt) { NOT_FOUND },
+               sub (/favicon.ico) { NOT_FOUND },
+
                sub (/src/:job) {
                        return NOT_FOUND if !job;
                        my $isowner = remote_user && remote_user->id eq job->rawowner;
This page took 0.024857 seconds and 4 git commands to generate.