Skip to content

Commit

Permalink
Update doc for TLS supporting
Browse files Browse the repository at this point in the history
  • Loading branch information
luin committed Sep 18, 2015
1 parent 04aa66f commit 6ff9c3e
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,21 @@ option to `false`:
var redis = new Redis({ enableOfflineQueue: false });
```

## TLS Options
Redis doesn't support TLS natively, however if the redis server you want to connect to is hosted behind a TLS proxy (e.g. [stunnel](https://www.stunnel.org/)) or is offered by a PaaS service that supports TLS connection (e.g. [Redis Labs](https://redislabs.com/)), you can set the `tls` option:

```javascript
var redis = new Redis({
host: 'localhost',
tls: {
// Refer to `tls.connect()` section in
// https://nodejs.org/api/tls.html
// for all supported options
ca: fs.readFileSync('cert.pem')
}
});
```

<hr>

## Sentinel
Expand Down Expand Up @@ -568,21 +583,6 @@ function (times) {
}
```

## TLS Options
Redis doesn't support TLS natively, however if the redis server you want to connect to is hosted behind a TLS proxy (e.g. [stunnel](https://www.stunnel.org/)) or is offered by a PaaS service that supports TLS connection (e.g. [Redis Labs](https://redislabs.com/)), you can set the `tls` option:

```javascript
var redis = new Redis({
host: 'localhost',
tls: {
// Refer to `tls.connect()` section in
// https://nodejs.org/api/tls.html
// for all supported options
ca: fs.readFileSync('cert.pem')
}
});
```

## Cluster
Redis Cluster provides a way to run a Redis installation where data is automatically sharded across multiple Redis nodes.
You can connect to a Redis Cluster like this:
Expand Down

0 comments on commit 6ff9c3e

Please sign in to comment.