3 ms·
It is even easier: https://github.com/mholt/certmagic https://github.com/mholt/certmagic Edit: Taken from certmagic docs Instead of: // plaintext HTTP, gross
by erdii 8y ago
It 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)