Skip to content

fix(client): make socket.host not required #3024

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 21, 2025

Conversation

nkaradzhov
Copy link
Collaborator

@nkaradzhov nkaradzhov commented Jul 21, 2025

Underlying node tls.ConnectionOptions does not require host, so we shouldnt as well. Further, if url is provided in the upper level config, it takes precedence, which could be misleading:

createClient({
  url: 'rediss://user:secret@localhost:6379/0',
  socket: {
    tls: true,
    host: 'somehost' <-- this gets overwritten to `localhost`
  }
});

fixes #3023

Underlying node tls.ConnectionOptions does not require host,
so we shouldnt as well. Further, if `url` is provided in
the upper level config, it takes precedence, which could be misleading:

createClient({
  url: 'rediss://user:secret@localhost:6379/0',
  socket: {
    tls: true,
    host: 'somehost' <-- this gets overwritten to `localhost`
  }
});

fixes redis#3023
@nkaradzhov nkaradzhov merged commit 539fe52 into redis:master Jul 21, 2025
14 checks passed
@nkaradzhov nkaradzhov deleted the fix-socket-properties branch July 21, 2025 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Typescript error configuring client socket at version v5.x (Heroku example)
3 participants