3 ms·
I'd love to help, but my coding time is already taken building a product. I pretty much followed the instructions here: https://godoc.org/golang.org/x/crypto/a
by marcus_holmes 8y ago
I'd love to help, but my coding time is already taken building a product.
I pretty much followed the instructions here:
https://godoc.org/golang.org/x/crypto/acme/autocert https://godoc.org/golang.org/x/crypto/acme/autocert
edit, better here: https://blog.kowalczyk.info/article/Jl3G/https-for-free-in-go-with-little-help-of-lets-encrypt.html https://blog.kowalczyk.info/article/Jl3G/https-for-free-in-g...
I didn't believe it could be that simple, but it worked first time and has proven really robust.
- erdii 8y agoIt is even easier: https://github.com/mholt/certmagic https://github.com/mholt/certmagic Edit: Taken from certmagic docs Instead of: // plaintext HTTP, gross http.ListenAndServe(":80", mux) Use CertMagic: // encrypted HTTPS with HTTP->HTTPS redirects - yay! certmagic.HTTPS([]string{"example.com"}, mux)