Search engines don’t like duplicate content. To rewrite trailing slashes some Nginx configuration is required.
If you rewrite all URLs, some issues rise with the Magento backend admin and some other endpoints.

To resolve this issue, use the following snippet to strip all trailing slashes and add this to your /data/web/nginx/server.rewrites:

Or this snippet if you want to add trailing slashes:

Replace /admin and /webpos with URLs that should not be rewritten in a regex of URLs separated by pipes (|).