consider the following host:
host(fr'^api', 'api.urls', name='api')
i went through the codebase and found self.compiled_regex = re.compile(r'%s%s(\.|:|$)' % (regex, suffix))
now internally the complied_regex = re.compile('^api(\\.|:|$)')
this creates a problem, if i go to api.localhost this works as expected, but if I go to api.xyz.localhost it still routes me to api.urls
so maybe change the complied_regex to re.compile(r'%s%s(:[0-9]+)?$)' % (regex, suffix)) ?
this will ensure the regex follows parent_host and is either followed by a port with atleast one digit, or no port at all
but this will also force user to give the parent_host, which i think would not be a major problem
if this makes sense, and is ok, i would like to be assigned for this
consider the following host:
host(fr'^api', 'api.urls', name='api')
i went through the codebase and found
self.compiled_regex = re.compile(r'%s%s(\.|:|$)' % (regex, suffix))
now internally the complied_regex =re.compile('^api(\\.|:|$)')
this creates a problem, if i go to
api.localhost
this works as expected, but if I go toapi.xyz.localhost
it still routes me to api.urlsso maybe change the complied_regex to
re.compile(r'%s%s(:[0-9]+)?$)' % (regex, suffix))
? this will ensure theregex
followsparent_host
and is either followed by a port with atleast one digit, or no port at allbut this will also force user to give the parent_host, which i think would not be a major problem
if this makes sense, and is ok, i would like to be assigned for this