From 24736a244adf42eb4a886d7dd352af7f75f9b56b Mon Sep 17 00:00:00 2001 From: Devin Lane Date: Fri, 22 Sep 2023 11:45:49 -0600 Subject: [PATCH] add --remote-allow-origins to allow websocket connection --- electron_inject/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electron_inject/__init__.py b/electron_inject/__init__.py index d73b56e..f2ca504 100644 --- a/electron_inject/__init__.py +++ b/electron_inject/__init__.py @@ -109,7 +109,7 @@ def execute(cls, path, port=None): port = sock.getsockname()[1] sock.close() - cmd = "%s %s" % (path, "--remote-debugging-port=%d" % port) + cmd = "%s %s" % (path, "--remote-allow-origins=http://localhost:%d --remote-debugging-port=%d" % (port, port)) print (cmd) p = subprocess.Popen(cmd, shell=True) time.sleep(0.5)