mirror of
https://github.com/danog/code-server.git
synced 2024-11-26 20:34:56 +01:00
Unambiguify address replacement
Co-authored-by: Teffen Ellis <TeffenEllis@users.noreply.github.com>
This commit is contained in:
parent
cde94d5ed4
commit
dc177ab505
@ -161,7 +161,7 @@ const main = async (args: DefaultedArgs): Promise<void> => {
|
||||
|
||||
if (!args.socket && args.open) {
|
||||
// The web socket doesn't seem to work if browsing with 0.0.0.0.
|
||||
const openAddress = serverAddress.replace(/:\/\/0.0.0.0/, "://localhost")
|
||||
const openAddress = serverAddress.replace("://0.0.0.0", "://localhost")
|
||||
await open(openAddress).catch((error: Error) => {
|
||||
logger.error("Failed to open", field("address", openAddress), field("error", error))
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user