mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-06 01:53:37 +00:00
Merge branch 'feature/ChangeReValidHost' into develop
This commit is contained in:
commit
cbcff5cfc2
1 changed files with 5 additions and 4 deletions
|
@ -1351,10 +1351,11 @@ def maybe_plural(number=1):
|
|||
|
||||
|
||||
def re_valid_hostname(with_allowed=True):
|
||||
return re.compile(r'(?i)(%slocalhost|.*\.local|%s|%s)$' % (
|
||||
'%s|' % (with_allowed
|
||||
and (sickbeard.ALLOWED_HOSTS and re.escape(sickbeard.ALLOWED_HOSTS).replace(',', '|') or '.*')
|
||||
or ''), socket.gethostname() or 'localhost', valid_ipaddr_expr()))
|
||||
this_host = socket.gethostname()
|
||||
return re.compile(r'(?i)(%slocalhost|.*\.local|%s%s)$' % (
|
||||
(with_allowed
|
||||
and '%s|' % (sickbeard.ALLOWED_HOSTS and re.escape(sickbeard.ALLOWED_HOSTS).replace(',', '|') or '.*')
|
||||
or ''), bool(this_host) and ('%s|' % this_host) or '', valid_ipaddr_expr()))
|
||||
|
||||
|
||||
def valid_ipaddr_expr():
|
||||
|
|
Loading…
Reference in a new issue