Skip to content

Commit

Permalink
Merge pull request #2746 from pallets/2742-empty-url-prefix
Browse files Browse the repository at this point in the history
allow empty prefix and no lead slash in bp route
  • Loading branch information
davidism authored Apr 29, 2018
2 parents 6b2127b + f138707 commit 73bf519
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flask/blueprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def add_url_rule(self, rule, endpoint=None, view_func=None, **options):
to the application. The endpoint is automatically prefixed with the
blueprint's name.
"""
if self.url_prefix:
if self.url_prefix is not None:
rule = '/'.join((self.url_prefix, rule.lstrip('/')))
options.setdefault('subdomain', self.subdomain)
if endpoint is None:
Expand Down

0 comments on commit 73bf519

Please sign in to comment.