local-ip.sh/http/server.go

16 lines
355 B
Go
Raw Normal View History

2023-12-12 22:05:57 +00:00
package http
import (
"net/http"
)
func ServeCertificate() {
http.HandleFunc("/server.key", func(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, "/certs/server.key")
})
http.HandleFunc("/server.pem", func(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, "/certs/server.pem")
})
http.ListenAndServe(":9229", nil)
}