Several users have been able to successfully deploy http-server if they reverse-proxy it from Cloudflare and using a relaxed https-to-http connection between Cloudflare and the origin.
We should be able to support Let's Encrypt auto-certificates by leveraging Caddy's certmagic package.
At the core, it would be a matter of replacing the listener with:
err := certmagic.HTTPS([]string{"example.com", "www.example.com"}, mux)
if err != nil {
return err
}
Which per the certmagic documentation, it will redirect http to https traffic.
Several users have been able to successfully deploy
http-serverif they reverse-proxy it from Cloudflare and using a relaxed https-to-http connection between Cloudflare and the origin.We should be able to support Let's Encrypt auto-certificates by leveraging Caddy's
certmagicpackage.At the core, it would be a matter of replacing the listener with:
Which per the
certmagicdocumentation, it will redirect http to https traffic.