No more funny business with InsecureSkipVerify
This commit is contained in:
@@ -3,7 +3,6 @@ package main
|
||||
import "sync"
|
||||
import "path"
|
||||
import "net/http"
|
||||
import "crypto/tls"
|
||||
import "html/template"
|
||||
import "hnakra/service"
|
||||
|
||||
@@ -28,12 +27,10 @@ func main () {
|
||||
board.mux = http.NewServeMux()
|
||||
board.Service = service.Service {
|
||||
&service.HTTP {
|
||||
Mount: service.MountConfig {
|
||||
Path: board.root,
|
||||
Name: "Board",
|
||||
Description: "A board where you can post things.",
|
||||
TLSConfig: &tls.Config { InsecureSkipVerify: true },
|
||||
},
|
||||
Mount: service.M (
|
||||
"Board",
|
||||
"A board where you can post things.",
|
||||
"@", board.root),
|
||||
Handler: board.mux,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ package main
|
||||
import "fmt"
|
||||
import "log"
|
||||
import "net/http"
|
||||
import "crypto/tls"
|
||||
import "hnakra/service"
|
||||
|
||||
func main () {
|
||||
@@ -11,13 +10,10 @@ func main () {
|
||||
|
||||
http.HandleFunc("/gifs/", gifs)
|
||||
http.Handle("/gifs/static/", http.StripPrefix("/gifs/static", static))
|
||||
|
||||
err := (&service.HTTP { Mount: service.MountConfig {
|
||||
Path: "/gifs/",
|
||||
Name: "Gifs",
|
||||
Description: "Serves a lot of big gifs on one page.",
|
||||
TLSConfig: &tls.Config { InsecureSkipVerify: true },
|
||||
}}).Run()
|
||||
|
||||
err := service.NewHTTP (
|
||||
"Gifs", "Serves a lot of big gifs on one page.",
|
||||
"@", "/gifs/").Run()
|
||||
|
||||
if err != nil {
|
||||
log.Println("XXX", err)
|
||||
|
||||
@@ -2,17 +2,11 @@ package main
|
||||
|
||||
import "log"
|
||||
import "net/http"
|
||||
import "crypto/tls"
|
||||
import "hnakra/service"
|
||||
|
||||
func main () {
|
||||
http.HandleFunc("/hello/", hellorld)
|
||||
err := (&service.HTTP { Mount: service.MountConfig {
|
||||
Path: "/hello/",
|
||||
Name: "Hellorld",
|
||||
Description: "A test service.",
|
||||
TLSConfig: &tls.Config { InsecureSkipVerify: true },
|
||||
}}).Run()
|
||||
err := service.NewHTTP("Hellorld", "A test service.", "@", "/hello/").Run()
|
||||
|
||||
if err != nil {
|
||||
log.Println("XXX", err)
|
||||
|
||||
@@ -2,7 +2,6 @@ package main
|
||||
|
||||
import "log"
|
||||
import "net/http"
|
||||
import "crypto/tls"
|
||||
import "hnakra/service"
|
||||
|
||||
func main () {
|
||||
@@ -15,12 +14,9 @@ func main () {
|
||||
http.ServeFile(res, req, "fractal.png")
|
||||
})
|
||||
|
||||
err := (&service.HTTP { Mount: service.Mount {
|
||||
Path: "/fractal.png",
|
||||
Name: "Image",
|
||||
Description: "Displays an image of a fractal.",
|
||||
TLSConfig: &tls.Config { InsecureSkipVerify: true },
|
||||
}}).Run()
|
||||
|
||||
err := service.NewHTTP (
|
||||
"Image",
|
||||
"Displays an image of a fractal.",
|
||||
"@", "/fractal.png").Run()
|
||||
if err != nil { log.Println("XXX", err) }
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user