3 ms·
Is it possible to do https serving in any of the web frameworks? Last I checked (months ago) it did not seem possible. I guess a crypto and tls library would be
by deskamess 11y ago
Is it possible to do https serving in any of the web frameworks? Last I checked (months ago) it did not seem possible. I guess a crypto and tls library would be essential to this. I think https is pretty important feature to have given http2 and whats coming down the pipe.
- steveklabnik 11y agoAs far as I know, hyper has HTTPS support, yes. We use an openssl wrapper in Cargo all the time.
- deskamess 11y agoCan you point me to an example? I tried looking at the cargo github repo and searched for tls but had no luck. Also searched for 443 and found it in source.rs but it was in a url canonicalization function when calling github. I am looking for example code where I can pass in the server certificate prior to listening. Something similar in functionality to Go's http.ListenAndServeTLS(":443", "cert.pem", "key.pem", nil) Edit: typo
- steveklabnik 11y agoCargo is a client, not a server, so that's probably where your problem finding things lies. I don't have an example handy, to be honest. Historically speaking, when deploying Rails, I would always use Nginx in front of my application server to terminate SSL anyway... Also, the Iron docs that another commenter pointed you at looks vaguely like that call. I'm not familiar with Go's API.
- Coding_Cat 11y agoIron supports it at the least( http://ironframework.io/doc/iron/enum.Protocol.html http://ironframework.io/doc/iron/enum.Protocol.html ). And if you want to patch other frameworks or build your own: I have personally used Hyper (http-crate) with the OpenSSL crate to do Https before and I found it very easy.