From: Raphaƫl Gertz Date: Thu, 13 Oct 2022 12:08:03 +0000 (+0200) Subject: Prevent robot from indexing maps X-Git-Tag: 0.2.2~1 X-Git-Url: https://git.rapsys.eu/packbundle/commitdiff_plain/09fee1b85a48764e77a2a3f132450b264ce12d0d?ds=sidebyside Prevent robot from indexing maps --- diff --git a/Controller/MapController.php b/Controller/MapController.php index 730fb72..6ebb810 100644 --- a/Controller/MapController.php +++ b/Controller/MapController.php @@ -294,6 +294,9 @@ class MapController extends AbstractController implements ServiceSubscriberInter //Set last modified $response->setLastModified(\DateTime::createFromFormat('U', strval($mtime))); + //Disable robot index + $response->headers->set('X-Robots-Tag', 'noindex'); + //Set as public $response->setPublic(); @@ -539,6 +542,9 @@ class MapController extends AbstractController implements ServiceSubscriberInter //Set last modified $response->setLastModified(\DateTime::createFromFormat('U', strval($mtime))); + //Disable robot index + $response->headers->set('X-Robots-Tag', 'noindex'); + //Set as public $response->setPublic();