Feature added: Unifi. #79
This commit is contained in:
parent
9774a02131
commit
5ba5e6eda1
9 changed files with 137 additions and 38 deletions
|
@ -90,7 +90,8 @@ def rfc1918_ip_check(ip):
|
|||
return rfc1918_ip
|
||||
|
||||
|
||||
def connection_handler(session, request, verify):
|
||||
def connection_handler(session, request, verify, as_is_reply=False):
|
||||
air = as_is_reply
|
||||
s = session
|
||||
r = request
|
||||
v = verify
|
||||
|
@ -114,6 +115,8 @@ def connection_handler(session, request, verify):
|
|||
if get.headers['X-Auth-Token']:
|
||||
return get.headers['X-Auth-Token']
|
||||
|
||||
if air:
|
||||
return get
|
||||
except InvalidSchema:
|
||||
logger.error("You added http(s):// in the config file. Don't do that.")
|
||||
|
||||
|
@ -123,6 +126,7 @@ def connection_handler(session, request, verify):
|
|||
except ConnectionError as e:
|
||||
logger.error('Cannot resolve the url/ip/port. Check connectivity. Error: %s', e)
|
||||
|
||||
|
||||
return return_json
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue