mirror of
https://github.com/actix/actix-extras.git
synced 2025-06-26 18:37:41 +02:00
feat(session): add rustls (actix#342) (#402)
* feat(session): add rustls feature (actix#342) * docs(session): fix weird grammar * docs: update crate docs --------- Co-authored-by: Rob Ede <robjtede@icloud.com>
This commit is contained in:
committed by
GitHub
parent
8195484415
commit
931c4eea4d
@ -116,12 +116,20 @@ attached to your sessions. You can enable:
|
||||
```
|
||||
|
||||
Add the `redis-rs-tls-session` feature flag if you want to connect to Redis using a secured
|
||||
connection:
|
||||
connection (via the `native-tls` crate):
|
||||
|
||||
```toml
|
||||
[dependencies]
|
||||
# ...
|
||||
actix-session = { version = "...", features = ["redis-rs-session", "redis-rs-tls-session"] }
|
||||
actix-session = { version = "...", features = ["redis-rs-tls-session"] }
|
||||
```
|
||||
|
||||
If you instead prefer depending on `rustls`, use the `redis-rs-tls-session-rustls` feature flag:
|
||||
|
||||
```toml
|
||||
[dependencies]
|
||||
# ...
|
||||
actix-session = { version = "...", features = ["redis-rs-tls-session-rustls"] }
|
||||
```
|
||||
|
||||
You can implement your own session storage backend using the [`SessionStore`] trait.
|
||||
|
@ -44,7 +44,7 @@ use crate::storage::{
|
||||
/// ```
|
||||
///
|
||||
/// # TLS support
|
||||
/// Add the `redis-rs-tls-session` feature flag to enable TLS support. You can then establish a TLS
|
||||
/// Add the `redis-rs-tls-session` or `redis-rs-tls-session-rustls` feature flag to enable TLS support. You can then establish a TLS
|
||||
/// connection to Redis using the `rediss://` URL scheme:
|
||||
///
|
||||
/// ```no_run
|
||||
|
Reference in New Issue
Block a user