From 09fee1b85a48764e77a2a3f132450b264ce12d0d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Thu, 13 Oct 2022 14:08:03 +0200 Subject: [PATCH] Prevent robot from indexing maps --- Controller/MapController.php | 6 ++++++ 1 file changed, 6 insertions(+) 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(); -- 2.41.1