1
0
mirror of https://github.com/actix/actix-website synced 2025-06-27 07:29:02 +02:00

docs: use rustls in http/2 example

This commit is contained in:
Rob Ede
2024-03-02 17:30:54 +00:00
parent 7c063e890f
commit 2f9e49c622
4 changed files with 29 additions and 19 deletions

View File

@ -10,16 +10,11 @@ import RenderCodeBlock from '@theme/CodeBlock'; import CodeBlock from '@site/src
<!-- TODO: use rustls example -->
When either of the `rustls` or `openssl` features are enabled, `HttpServer` provides the [bind_rustls][bindrustls] method and [bind_openssl][bindopenssl] methods, respectively.
When either of the `rustls` or `openssl` features are enabled, `HttpServer` provides the [`bind_rustls()`][bindrustls] method and [`bind_openssl()`][bindopenssl] methods, respectively.
<!-- DEPENDENCY -->
<RenderCodeBlock className="language-toml">
{`[dependencies]
actix-web = { version = "${actixWebMajorVersion}", features = ["openssl"] }
openssl = { version = "0.10", features = ["v110"] }
`}
</RenderCodeBlock>
<CodeBlock example="http2" file="manifest" section="deps" language="toml"></CodeBlock>
<CodeBlock example="http2" file="main.rs" section="main" />
@ -29,7 +24,7 @@ Upgrades to HTTP/2 described in [RFC 7540 §3.2][rfcsection32] are not supported
[rfcsection32]: https://httpwg.org/specs/rfc7540.html#rfc.section.3.2
[rfcsection34]: https://httpwg.org/specs/rfc7540.html#rfc.section.3.4
[bindrustls]: https://docs.rs/actix-web/4/actix_web/struct.HttpServer.html#method.bind_rustls
[bindrustls]: https://docs.rs/actix-web/4/actix_web/struct.HttpServer.html#method.bind_rustls_0_22
[bindopenssl]: https://docs.rs/actix-web/4/actix_web/struct.HttpServer.html#method.bind_openssl
[tlsalpn]: https://tools.ietf.org/html/rfc7301
[examples]: https://github.com/actix/examples/tree/master/https-tls