mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-28 13:42:01 -08:00
Fix tls by setting ServerName (xmpp) (#114)
Fixes error message shown by tls: "either ServerName or InsecureSkipVerify must be specified in the tls.Config"
This commit is contained in:
parent
884599d27d
commit
9bf10e4b58
@ -61,6 +61,7 @@ func (b *Bxmpp) Send(msg config.Message) error {
|
|||||||
func (b *Bxmpp) createXMPP() (*xmpp.Client, error) {
|
func (b *Bxmpp) createXMPP() (*xmpp.Client, error) {
|
||||||
tc := new(tls.Config)
|
tc := new(tls.Config)
|
||||||
tc.InsecureSkipVerify = b.Config.SkipTLSVerify
|
tc.InsecureSkipVerify = b.Config.SkipTLSVerify
|
||||||
|
tc.ServerName = strings.Split(b.Config.Server, ":")[0]
|
||||||
options := xmpp.Options{
|
options := xmpp.Options{
|
||||||
Host: b.Config.Server,
|
Host: b.Config.Server,
|
||||||
User: b.Config.Jid,
|
User: b.Config.Jid,
|
||||||
|
Loading…
Reference in New Issue
Block a user