diff --git a/sanic/app.py b/sanic/app.py index ff680d9c..7c25d15c 100644 --- a/sanic/app.py +++ b/sanic/app.py @@ -382,8 +382,8 @@ class Sanic: 'Endpoint with name `{}` was not found'.format( view_name)) - if uri != '/' and uri.endswith('/'): - uri = uri[:-1] + if uri != '/': + uri = uri.rstrip('/') out = uri