From 294ff9728e8529533b822f8556ef9169dc26cf75 Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Mon, 4 Mar 2024 15:23:32 +1300 Subject: [PATCH] Create .0.0.md --- en/08_Changelogs/6.0.0.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 en/08_Changelogs/6.0.0.md diff --git a/en/08_Changelogs/6.0.0.md b/en/08_Changelogs/6.0.0.md new file mode 100644 index 000000000..8f28cf58f --- /dev/null +++ b/en/08_Changelogs/6.0.0.md @@ -0,0 +1,34 @@ +--- +title: 6.0.0 (unreleased) +--- + +# 6.0.0 (unreleased) + +## Overview + +- [Run `CanonicalURLMiddleware` in all environments by default](#url-middleware) +- [Bug fixes](#bug-fixes) + +## Run `CanonicalURLMiddleware` in all environments by default {#url-middleware} + +In Silverstripe CMS 5 [`CanonicalURLMiddleware`](api:SilverStripe\Control\Middleware\CanonicalURLMiddleware) only runs in production by default. This lead to issues with `fetch` and APIs behaving differently in production environments to development. Silverstripe 6.0 changes this default to run the rules in dev, test and live by default. + +To opt out of this change include the following in your `_config.php` + +```php +use SilverStripe\Core\CoreKernel; + +if (Director::isDev()) { + CanonicalURLMiddleware::singleton()->setEnabledEnvs([ + CoreKernel::LIVE + ]); +} +``` + +## Bug fixes + +This release includes a number of bug fixes to improve a broad range of areas. Check the change logs for full details of these fixes split by module. Thank you to the community members that helped contribute these fixes as part of the release! + + + +