I am trying to deploy one of the actix-web examples that offers HTTP/2 support in Heroku, after having slightly modified it to listen at the provided $PORT
number, as well as the way in which certs are loaded -- rather than read from a file, it obtains the public and private key from the environment.
The problem is that, on each request, the Heroku router logs that the connection is closed without a response.
heroku[router]:
at=error
code=H13
desc="Connection closed without response"
method=GET
status=503
bytes=0
protocol=https
As it worked locally, I suspect the issue is at my dyno's configuration, which is a Hobby ($7/mo), especially at the certs section. As the application expects to receive the cert info from the environmental variables and having that Heroku does not provide you access to their certificates (e.g cert for xxxxx.herokuapp.com), I bought a domain name with the hopes of generating my own. I did, using the following page.
With a self-generated cert, I've tried so far the following, resulting in any of cases in the following errors:
https
access is disabled and the dyno is not even hit.However, if I remove the related rustls
lines, everything works smoothly, but the protocol used is HTTP/1.1
.
Therefore, I'd like to kindly ask you:
I've just found that Heroku does not support HTTP/2 at the time (source):
HTTP/2 is not currently supported on Heroku although this may change in future. You can find out about our currently supported HTTP protocols here: https://devcenter.heroku.com/articles/http-routing#http-versions-supported
For any future developments we recommend subscribing to the Heroku Changelog. This will let you know about updates, improvements and deprecations ahead of time so that you can make any necessary adjustments.