Allow Redirects with Trailing Slashes
Problem: The Redirect module currently disallows adding source redirects with trailing slashes (e.g., /example/). This limitation makes it challenging to manage frontend redirects where trailing slashes may need to be included. For headless or decoupled CMS setups, where Drupal acts purely as the content management backend and the frontend handles routing, the ability to add redirects with trailing slashes is necessary. This is a common use case for headless or backend-only CMS setups.
For example, if our frontend expects /example/ (with a trailing slash), we should be able to set up a source redirect with the same structure. Currently, when trying to enter a redirect with a trailing slash in the source path, users receive an error.
Proposed Solution: Allow users to enter source paths with trailing slashes as valid redirects. This change would only affect configurations where Drupal is used as a backend or headless CMS, allowing developers the flexibility to manage paths in a way that matches frontend expectations.