diff --git a/CHANGELOG.md b/CHANGELOG.md index facb46c3eb2..74891abd71b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +- Craft now sends `X-Robots-Tag: none` headers for preview requests. ([#15612](https://github.com/craftcms/cms/pull/15612), [#15586](https://github.com/craftcms/cms/issues/15586)) - Fixed a SQL error that occurred when running the `db/convert-charset` command if there were any custom database views or sequences. ([#15598](https://github.com/craftcms/cms/issues/15598)) - Fixed a bug where `craft\helpers\Db::supportsTimeZones()` could return `false` on databases that supported time zone conversion. ([#15592](https://github.com/craftcms/cms/issues/15592)) - Fixed a bug where Assets fields were validating settings that weren’t applicable depending on the “Restrict assets to a single location” setting. ([#15545](https://github.com/craftcms/cms/issues/15545)) diff --git a/src/web/Application.php b/src/web/Application.php index f934e83aedc..072c34b624e 100644 --- a/src/web/Application.php +++ b/src/web/Application.php @@ -191,6 +191,7 @@ public function handleRequest($request, bool $skipSpecialHandling = false): Base $generalConfig->disallowRobots || $request->getIsCpRequest() || $request->getToken() !== null || + $request->getIsPreview() || ($request->getIsActionRequest() && !($request->getIsLoginRequest() && $request->getIsGet())) ) { $headers->set('X-Robots-Tag', 'none');