CertMagic: Caddy's automagic HTTPS features as a Go library

(Matt Holt) #1

CertMagic

Today I’m announcing CertMagic, which is essentially Caddy’s automatic HTTPS features as a separate package for any Go program to use.

Only CertMagic makes it possible to get one-line HTTPS servers like this:

err := certmagic.HTTPS([]string{"example.com", "www.example.com"}, mux)

Complete with HTTP->HTTPS redirects, robust OCSP stapling, and everything else Caddy has to offer.

I’m in the process of transitioning Caddy to use the certmagic package, which is about halfway done on a local branch. I’ll push it as soon as I’m done – would love it if people helped to test it!

7 Likes
(Matt Holt) pinned globally #2
(Jim Mendenhall) #3

So very cool! Thanks so much!

1 Like