statamic / cms

The core Laravel CMS Composer package
https://statamic.com
Other
4.11k stars 538 forks source link

[5.x] Fix bard text trimming when CP is on root URL #11127

Closed jacksleight closed 1 week ago

jacksleight commented 1 week ago

Fixes https://github.com/statamic/cms/issues/11125

If the CP route is empty (ie. in headless mode with the CP at the root of the domain) the original request check that disables the default TrimStrings middleware fails. This PR fixes it by assuming all requests are CP requests if the route is empty.