]> Raphaƫl G. Git Repositories - packbundle/blobdiff - Controller/MapController.php
Add map public path
[packbundle] / Controller / MapController.php
index 730fb7270103aeccb4b96380e7d91a99066c00d8..5de1d8251a56a5a94a8fa8fc413961cb80074c04 100644 (file)
@@ -35,13 +35,6 @@ class MapController extends AbstractController implements ServiceSubscriberInter
         */
        protected string $cache;
 
-       /**
-        * The ContainerInterface instance
-        *
-        * @var ContainerInterface
-        */
-       protected $container;
-
        /**
         * The stream context instance
         */
@@ -294,6 +287,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 +535,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();