mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-07 12:16:04 +00:00
Fix bug when use the devtools protocol with the remote allow origins (Fix WebSocket error)
This commit is contained in:
parent
4c0895850b
commit
98e73b2372
|
@ -150,9 +150,11 @@ namespace WelsonJS.Launcher
|
|||
}
|
||||
public static void OpenWebBrowser(string url)
|
||||
{
|
||||
Uri resourceServerUri = new Uri(GetAppConfig("ResourceServerPrefix"));
|
||||
Uri devToolsUri = new Uri(GetAppConfig("DevToolsPrefix"));
|
||||
|
||||
string userDataDir = Path.Combine(GetAppDataPath(), "EdgeUserProfile");
|
||||
string remoteAllowOrigins = GetAppConfig("ResourceServerPrefix");
|
||||
int remoteDebuggingPort = new Uri(GetAppConfig("DevToolsPrefix")).Port;
|
||||
string remoteAllowOrigins = $"{resourceServerUri.Scheme}://{resourceServerUri.Host}:{resourceServerUri.Port}";
|
||||
string[] arguments = {
|
||||
$"\"{url}\"",
|
||||
$"--remote-debugging-port={remoteDebuggingPort}",
|
||||
|
|
|
@ -395,7 +395,7 @@
|
|||
if (response.id == 3) {
|
||||
const responseContent = response.result.result.value;
|
||||
|
||||
appendTextToEditor(responseContent);
|
||||
appendTextToEditor("/*\n" + responseContent + "\n*/");
|
||||
pushPromptMessage("assistant", responseContent);
|
||||
|
||||
socket.close();
|
||||
|
|
Loading…
Reference in New Issue
Block a user