Skip to content

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