Skip to content

Commit 99527f0

Browse files
authored
docs: README update to highlight how to disable sending client identification (#2913)
1 parent b5a9e5d commit 99527f0

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

.github/wordlist.txt

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ ACLs
22
autoload
33
autoloader
44
autoloading
5+
analytics
56
Autoloading
67
backend
78
backends
@@ -13,6 +14,7 @@ customizable
1314
Customizable
1415
dataset
1516
de
17+
DisableIdentity
1618
ElastiCache
1719
extensibility
1820
FPM
@@ -43,6 +45,7 @@ RocksDB
4345
runtime
4446
SHA
4547
sharding
48+
SETNAME
4649
SSL
4750
struct
4851
stunnel

README.md

+24
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,30 @@ func ExampleClient() *redis.Client {
161161

162162
```
163163

164+
165+
### Advanced Configuration
166+
167+
go-redis supports extending the client identification phase to allow projects to send their own custom client identification.
168+
169+
#### Default Client Identification
170+
171+
By default, go-redis automatically sends the client library name and version during the connection process. This feature is available in redis-server as of version 7.2. As a result, the command is "fire and forget", meaning it should fail silently, in the case that the redis server does not support this feature.
172+
173+
#### Disabling Identity Verification
174+
175+
When connection identity verification is not required or needs to be explicitly disabled, a `DisableIndentity` configuration option exists. In V10 of this library, `DisableIndentity` will become `DisableIdentity` in order to fix the associated typo.
176+
177+
To disable verification, set the `DisableIndentity` option to `true` in the Redis client options:
178+
179+
```go
180+
rdb := redis.NewClient(&redis.Options{
181+
Addr: "localhost:6379",
182+
Password: "",
183+
DB: 0,
184+
DisableIndentity: true, // Disable set-info on connect
185+
})
186+
```
187+
164188
## Contributing
165189

166190
Please see [out contributing guidelines](CONTRIBUTING.md) to help us improve this library!

0 commit comments

Comments
 (0)