File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -443,6 +443,7 @@ def run_console(
443443 def run_local_server (
444444 self ,
445445 host = "localhost" ,
446+ bind_addr = None ,
446447 port = 8080 ,
447448 authorization_prompt_message = _DEFAULT_AUTH_PROMPT_MESSAGE ,
448449 success_message = _DEFAULT_WEB_SUCCESS_MESSAGE ,
@@ -463,6 +464,8 @@ def run_local_server(
463464 Args:
464465 host (str): The hostname for the local redirect server. This will
465466 be served over http, not https.
467+ bind_addr (str): The ip address for the redirect server to listen on
468+ when it is not the same as host (e.g. in a container).
466469 port (int): The port for the local redirect server.
467470 authorization_prompt_message (str): The message to display to tell
468471 the user to navigate to the authorization URL.
@@ -483,7 +486,7 @@ def run_local_server(
483486 # Fail fast if the address is occupied
484487 wsgiref .simple_server .WSGIServer .allow_reuse_address = False
485488 local_server = wsgiref .simple_server .make_server (
486- host , port , wsgi_app , handler_class = _WSGIRequestHandler
489+ bind_addr or host , port , wsgi_app , handler_class = _WSGIRequestHandler
487490 )
488491
489492 redirect_uri_format = (
You can’t perform that action at this time.
0 commit comments