-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Labels
Description
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.