aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--matrix/matrix.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/matrix/matrix.go b/matrix/matrix.go
index 254b212..29766f8 100644
--- a/matrix/matrix.go
+++ b/matrix/matrix.go
@@ -38,6 +38,7 @@ import (
"maunium.net/go/gomuks/lib/bfhtml"
"maunium.net/go/gomuks/matrix/pushrules"
"maunium.net/go/gomuks/matrix/rooms"
+ "crypto/tls"
)
// Container is a wrapper for a gomatrix Client and some other stuff.
@@ -94,6 +95,13 @@ func (c *Container) InitClient() error {
return err
}
+ allowInsecure := len(os.Getenv("GOMUKS_ALLOW_INSECURE_SERVER")) > 0
+ if allowInsecure {
+ c.client.Client = &http.Client{
+ Transport: &http.Transport{TLSClientConfig: &tls.Config{InsecureSkipVerify: true}},
+ }
+ }
+
c.stop = make(chan bool, 1)
if len(accessToken) > 0 {