Some SEO experts expect trailing slash on all the urls, including home page. Currently this is possible for all the urls but home page.
Offending code is in Drupal\Core\Routing\UrlGenerator::generateFromRoute():
if (!empty($options['prefix'])) {
$path = ltrim($path, '/');
$prefix = empty($path) ? rtrim($options['prefix'], '/') : $options['prefix'];
$path = '/' . str_replace('%2F', '/', rawurlencode($prefix)) . $path;
}
Suggested solution
By default $path contains empty string for home page but we can change it to forward slash using OutboundPathProcessor. Respect this and do not remove slash if it is the only thing in $path