From a143d8fa2f6e2942ddc1a1f52e7abe3780d9142f Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sat, 28 Dec 2024 12:57:01 +0100 Subject: [PATCH 1/2] robots.txt is a text file --- lib/MetaCPAN/Web/Controller/Root.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/MetaCPAN/Web/Controller/Root.pm b/lib/MetaCPAN/Web/Controller/Root.pm index 401857ba76..cb4c1f2653 100644 --- a/lib/MetaCPAN/Web/Controller/Root.pm +++ b/lib/MetaCPAN/Web/Controller/Root.pm @@ -88,6 +88,7 @@ sub robots : Path("robots.txt") : Args(0) { $c->browser_max_age('1d'); $c->cdn_max_age('1y'); + $c->res->content_type('text/plain'); $c->stash( { template => 'robots.txt', } ); From 6c15aceb688d02d3cf124ef9e22fadafd06d0146 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sat, 28 Dec 2024 12:57:29 +0100 Subject: [PATCH 2/2] remove exceptions from script tag checker that are no longer needed All inline scripts have been removed, so we no longer need the exceptions. --- t/html.t | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/t/html.t b/t/html.t index 5d837ed3a8..8e286c09c9 100644 --- a/t/html.t +++ b/t/html.t @@ -8,9 +8,7 @@ use File::Find (); use Path::Tiny qw( path ); # files that have inline