CanonicalURLMiddleware default to all environments

Having a Live/Prod only feature sets people up for bugs. 
A common scenario for this one is a javascript feature that requests from an API - its easy to forget a trailing slash in this scenario and it will work on your local an your test environment - failing only once you deploy it to prod. I'd suggest we turn this on everywhere except the CLI by default (or, disable it by default).
This commit is contained in:
Bernard Hamlin 2024-02-09 16:25:13 +13:00 committed by GitHub
parent 5e53dbcdbc
commit 0ec274fbbe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -81,7 +81,9 @@ class CanonicalURLMiddleware implements HTTPMiddleware
* @var array|bool
*/
protected $enabledEnvs = [
CoreKernel::LIVE
CoreKernel::LIVE,
CoreKernel::TEST,
CoreKernel::DEV,
];
/**