Skip to content

Building urls with host_matching Map does not produce host based URLs #488

@sharoonthomas

Description

@sharoonthomas
>>> from werkzeug import routing as r
>>> m = r.Map([
...   r.Rule('/', endpoint='index', host='www.domain.com'),
...   r.Rule('/', endpoint='index', host='my.domain.com'),
... ], host_matching=True)
>>> www = m.bind('www.domain.com')
>>> my = m.bind('my.domain.com')
>>> www.match('/')
('index', {})
>>> my.match('/')
('index', {})

When building

>>> www.build('index')
'/'
>>> my.build('index')
'http://www.domain.com/'

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions