fix bug: netloc always in url if SERVER_NAME defined in config even _external not true
This commit is contained in:
parent
cf2a363e5e
commit
fb419eaa36
|
@ -239,7 +239,10 @@ class Sanic:
|
|||
if scheme and not external:
|
||||
raise ValueError('When specifying _scheme, _external must be True')
|
||||
|
||||
netloc = kwargs.pop('_server', self.config.get('SERVER_NAME', ''))
|
||||
netloc = kwargs.pop('_server', None)
|
||||
if netloc is None and external:
|
||||
netloc = self.config.get('SERVER_NAME', '')
|
||||
|
||||
for match in matched_params:
|
||||
name, _type, pattern = self.router.parse_parameter_string(
|
||||
match)
|
||||
|
|
Loading…
Reference in New Issue
Block a user