Skip to content

Instantly share code, notes, and snippets.

@sinmetal
Created July 10, 2016 22:51
Show Gist options
  • Save sinmetal/89c10a14daef4becb184feb58d8f5279 to your computer and use it in GitHub Desktop.
Save sinmetal/89c10a14daef4becb184feb58d8f5279 to your computer and use it in GitHub Desktop.
package main
import (
"net/http"
)
func init() {
http.HandleFunc("/.well-known/acme-challenge/", handlerLetsencypt)
}
func handlerLetsencypt(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text.plain; charset=utf-8")
w.WriteHeader(http.StatusOK)
w.Write([]byte("Your Code")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment