Archived
1
0

Ensure socket is undefined with --coder-bind

This commit is contained in:
Anmol Sethi 2020-10-07 12:16:27 -04:00
parent c4f1c053bf
commit bfe731f4f3
No known key found for this signature in database
GPG Key ID: 8CEF1878FF10ADEB

View File

@ -38,11 +38,12 @@ const commit = pkg.commit || "development"
const main = async (args: Args, cliArgs: Args, configArgs: Args): Promise<void> => { const main = async (args: Args, cliArgs: Args, configArgs: Args): Promise<void> => {
if (args["coder-bind"]) { if (args["coder-bind"]) {
// If we're being exposed to the cloud, we listen on a random address and disable auth. // If we're being exposed to the cloud, we listen on a random address and disable auth.
args = { cliArgs = {
...args, ...cliArgs,
host: "localhost", host: "localhost",
port: 0, port: 0,
auth: AuthType.None, auth: AuthType.None,
socket: undefined,
} }
logger.info("coder-bind: disabling auth and listening on random localhost port") logger.info("coder-bind: disabling auth and listening on random localhost port")
} }