Skip to content

Commit

Permalink
docs: README update to highlight how to disable sending client identi…
Browse files Browse the repository at this point in the history
…fication (#2913)
  • Loading branch information
ofekshenawa authored Feb 20, 2024
1 parent b5a9e5d commit 99527f0
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ ACLs
autoload
autoloader
autoloading
analytics
Autoloading
backend
backends
Expand All @@ -13,6 +14,7 @@ customizable
Customizable
dataset
de
DisableIdentity
ElastiCache
extensibility
FPM
Expand Down Expand Up @@ -43,6 +45,7 @@ RocksDB
runtime
SHA
sharding
SETNAME
SSL
struct
stunnel
Expand Down
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,30 @@ func ExampleClient() *redis.Client {

```


### Advanced Configuration

go-redis supports extending the client identification phase to allow projects to send their own custom client identification.

#### Default Client Identification

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.

#### Disabling Identity Verification

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.

To disable verification, set the `DisableIndentity` option to `true` in the Redis client options:

```go
rdb := redis.NewClient(&redis.Options{
Addr: "localhost:6379",
Password: "",
DB: 0,
DisableIndentity: true, // Disable set-info on connect
})
```

## Contributing

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

0 comments on commit 99527f0

Please sign in to comment.