programatik29 / axum-server

High level server designed to be used with axum framework.
MIT License
168 stars 56 forks source link

HTTP/2 with rustls-acme #62

Closed nicolaspernoud closed 1 year ago

nicolaspernoud commented 1 year ago

Hello,

I use rustls-acme to create automatically Let's Encrypt certificates like in https://github.com/FlorianUekermann/rustls-acme/blob/main/examples/low_level_axum.rs . It works very well, but the server seems not to respond with HTTP/2, even if the http2 feature is enabled in axum.

How can I enable HTTP/2 ?

Thanks and best regards.

programatik29 commented 1 year ago

Since you are providing ServerConfig yourself, you should manually set alpn_protocols. Check out this code to see how axum-server does it for other methods.

programatik29 commented 1 year ago

This should probably be documented.

nicolaspernoud commented 1 year ago

Hello, That does the trick perfectly, thanks a lot. I'll reach out to the rustls-acme maintainer to see for the documentation. Best regards.

programatik29 commented 1 year ago

I mean it should be documented in this crate.

nicolaspernoud commented 1 year ago

Ah, OK, thanks !