Use TLS for HTTP

Proprietary

Replace http.ListenAndServe(addr, handler) with http.ListenAndServeTLS(addr, "cert.pem", "key.pem", handler) to encrypt traffic in transit.

org.openrewrite.golang.codequality.UseTlsForHttp
mod run . --recipe=org.openrewrite.golang.codequality.UseTlsForHttp

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.