No more funny business with InsecureSkipVerify

This commit is contained in:
Sasha Koshka
2023-05-27 03:57:27 -04:00
parent 9025844212
commit 5e37c4bb8f
8 changed files with 28 additions and 46 deletions

View File

@@ -2,21 +2,16 @@ package main
import "log"
import "net/http"
import "crypto/tls"
import "hnakra/service"
func main () {
http.HandleFunc("/kamikaze/", hellorld)
err := (&service.HTTP { Mount: service.MountConfig {
Path: "/kamikaze/",
Name: "Kamikaze",
Description: "A service that abrupltly closes upon any request, for testing",
TLSConfig: &tls.Config { InsecureSkipVerify: true },
}}).Run()
if err != nil {
log.Println("XXX", err)
}
err := service.NewHTTP (
"Kamikaze",
"A service that abrupltly closes upon any request, for testing.",
"@", "/kamikaze/").Run()
if err != nil { log.Println("XXX", err) }
}
func hellorld (res http.ResponseWriter, req *http.Request) {