You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was perhaps just confusing to me from the documentation. But reading Alternatively, specify the connection through a rediss:// URL. from the readme, it seemed intuitive to me that I could declare a client like:
And the constructor would parse the protocol rediss:// out from the host string. That appears to not be the case, and only available if specified like:
This is probably expected constructor behavior, but wasn't intuitive to me based on the documentation. I would suggest an action item of either:
Update the documentation to say something like Alternatively, specify the connection through a rediss:// URL if not passing RedisOptions.
Change the constructor to parse the protocol out from either mode. It seems like it would be a non-breaking change at least. And makes it less likely that some other dummy like me opens a similar Issue in the future :)
Do nothing, perhaps what I find unintuitive is common sense to everyone else. If this is the option chosen, feel free to close the Issue.
I believe the value in choosing 2 comes with deployment options. It makes it simpler to take pre-existing code that uses the RedisOptions struct (but omits the tls key), and upgrade it to use TLS connections if the proxy in front of your Redis server changes from a TLS-disabled configuration to a TLS-optional one. Say the host string in RedisOptions is set from an environment variable, a person deploying that code could simply change the relevant environment variable to include rediss://, rather than make a pull request to optionally specify tls: {} in their client configuration code.
The text was updated successfully, but these errors were encountered:
This was perhaps just confusing to me from the documentation. But reading
Alternatively, specify the connection through a rediss:// URL.
from the readme, it seemed intuitive to me that I could declare a client like:And the constructor would parse the protocol
rediss://
out from the host string. That appears to not be the case, and only available if specified like:This is probably expected constructor behavior, but wasn't intuitive to me based on the documentation. I would suggest an action item of either:
Alternatively, specify the connection through a rediss:// URL if not passing RedisOptions.
I believe the value in choosing 2 comes with deployment options. It makes it simpler to take pre-existing code that uses the RedisOptions struct (but omits the
tls
key), and upgrade it to use TLS connections if the proxy in front of your Redis server changes from a TLS-disabled configuration to a TLS-optional one. Say the host string in RedisOptions is set from an environment variable, a person deploying that code could simply change the relevant environment variable to includerediss://
, rather than make a pull request to optionally specifytls: {}
in their client configuration code.The text was updated successfully, but these errors were encountered: