Update Deno project configuration to use 127.0.0.1 instead of localhost for network permissions and server bindings. Adjust tests to reflect changes in server address handling.
This commit is contained in:
parent
baedc1f32a
commit
9d8c52eb02
4 changed files with 14 additions and 14 deletions
|
@ -247,7 +247,7 @@ export function setupOAuthCallbackServerWithLongPoll(
|
|||
options.events.emit("auth-code-received", code);
|
||||
});
|
||||
|
||||
const server = app.listen(options.port, "localhost", () => {
|
||||
const server = app.listen(options.port, "127.0.0.1", () => {
|
||||
log(`OAuth callback server running at http://127.0.0.1:${options.port}`);
|
||||
});
|
||||
|
||||
|
@ -281,7 +281,7 @@ export function findAvailablePort(
|
|||
server.on("error", (err: NodeJS.ErrnoException) => {
|
||||
if (err.code === "EADDRINUSE") {
|
||||
// If preferred port is in use, get a random port
|
||||
server.listen({ port: 0, hostname: "localhost" });
|
||||
server.listen({ port: 0, hostname: "127.0.0.1" });
|
||||
} else {
|
||||
reject(err);
|
||||
}
|
||||
|
@ -295,7 +295,7 @@ export function findAvailablePort(
|
|||
});
|
||||
|
||||
// Try preferred port first, or get a random port
|
||||
server.listen({ port: preferredPort || 0, hostname: "localhost" });
|
||||
server.listen({ port: preferredPort || 0, hostname: "127.0.0.1" });
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue