all repos — honk @ 2b518cdece32ea593886d500781a5b79cae91ce4

my fork of honk

in debug mode, disable https checking
Ted Unangst tedu@tedunangst.com
Wed, 13 May 2020 17:00:34 -0400
commit

2b518cdece32ea593886d500781a5b79cae91ce4

parent

4fa6445a38961746799a9c8fbc935c132ca72906

3 files changed, 13 insertions(+), 1 deletions(-)

jump to
M activity.goactivity.go

@@ -18,6 +18,7 @@

import ( "bytes" "context" + "crypto/tls" "database/sql" "fmt" "html"

@@ -56,12 +57,23 @@ }

return false } +var debugClient = &http.Client{ + Transport: &http.Transport{ + TLSClientConfig: &tls.Config{ + InsecureSkipVerify: true, + }, + }, +} + func PostJunk(keyname string, key httpsig.PrivateKey, url string, j junk.Junk) error { return PostMsg(keyname, key, url, j.ToBytes()) } func PostMsg(keyname string, key httpsig.PrivateKey, url string, msg []byte) error { client := http.DefaultClient + if debugMode { + client = debugClient + } req, err := http.NewRequest("POST", url, bytes.NewReader(msg)) if err != nil { return err
M honk.gohonk.go

@@ -260,6 +260,7 @@ masqName = serverName

} getconfig("usersep", &userSep) getconfig("honksep", &honkSep) + getconfig("debug", &debugMode) prepareStatements(db) switch cmd { case "admin":
M web.goweb.go

@@ -2357,7 +2357,6 @@ go tracker()

go bgmonitor() w100 := wait100ms() - getconfig("debug", &debugMode) readviews = templates.Load(debugMode, viewDir+"/views/honkpage.html", viewDir+"/views/honkfrags.html",