From fca31849502ed933e9abe70c555a58048c9623de Mon Sep 17 00:00:00 2001 From: BlipRanger <1860540+BlipRanger@users.noreply.github.com> Date: Wed, 12 May 2021 10:47:33 -0400 Subject: [PATCH] Bind socket to '0.0.0.0' rather than 'localhost' to allow for more flexible OAuth connection. (#368) --- bdfr/oauth2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bdfr/oauth2.py b/bdfr/oauth2.py index 6b27599..bd60c9b 100644 --- a/bdfr/oauth2.py +++ b/bdfr/oauth2.py @@ -70,8 +70,8 @@ class OAuth2Authenticator: def receive_connection() -> socket.socket: server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) - server.bind(('localhost', 7634)) - logger.log(9, 'Server listening on localhost:7634') + server.bind(('0.0.0.0', 7634)) + logger.log(9, 'Server listening on 0.0.0.0:7634') server.listen(1) client = server.accept()[0]