Skip to content

Let's Encrypt HTTPS support #145

Description

@patrickdappollonio

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions