mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Don't print allowed_ips if unused
This commit is contained in:
@@ -3490,6 +3490,7 @@ def is_allowed_ip():
|
|||||||
client_ip = request.remote_addr
|
client_ip = request.remote_addr
|
||||||
if request.path != '/genre_data.json':
|
if request.path != '/genre_data.json':
|
||||||
print("Connection Attempt: " + request.remote_addr)
|
print("Connection Attempt: " + request.remote_addr)
|
||||||
|
if allowed_ips:
|
||||||
print("Allowed?: ", request.remote_addr in allowed_ips)
|
print("Allowed?: ", request.remote_addr in allowed_ips)
|
||||||
return client_ip in allowed_ips
|
return client_ip in allowed_ips
|
||||||
|
|
||||||
@@ -4189,6 +4190,7 @@ def execute_outmod():
|
|||||||
@socketio.on('connect')
|
@socketio.on('connect')
|
||||||
def do_connect():
|
def do_connect():
|
||||||
print("Connection Attempt: " + request.remote_addr)
|
print("Connection Attempt: " + request.remote_addr)
|
||||||
|
if allowed_ips:
|
||||||
print("Allowed?: ", request.remote_addr in allowed_ips)
|
print("Allowed?: ", request.remote_addr in allowed_ips)
|
||||||
if request.args.get("rely") == "true":
|
if request.args.get("rely") == "true":
|
||||||
return
|
return
|
||||||
|
Reference in New Issue
Block a user