mirror of https://github.com/huashengdun/webssh
Merge pull request #3 from mzsombor/feature_source_address
fix: optional source address fieldpull/323/head
commit
d2c7cb3b38
|
@ -378,8 +378,8 @@ class IndexHandler(MixinHandler, tornado.web.RequestHandler):
|
||||||
return port
|
return port
|
||||||
|
|
||||||
def get_source_address(self):
|
def get_source_address(self):
|
||||||
value = self.get_value('source_address')
|
value = self.get_argument('source_address', u'')
|
||||||
if not is_valid_ip_address(value):
|
if value and not is_valid_ip_address(value):
|
||||||
raise InvalidValueError('Invalid source ip address: {}'.format(value))
|
raise InvalidValueError('Invalid source ip address: {}'.format(value))
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue