I\'m looking for a way to make sure that all of my urls end with a trailing slash (so first check if there is already a trailing slash at the end, and if not add one).
I
You can try to match only those URLs that do not end with a slash:
redirect: [ { from: '^.*(? req.url + '/' } ]