mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
fix(notifications): always verify Telegram certificate (#893)
This commit is contained in:
parent
64900c4d56
commit
82a117c12b
1 changed files with 1 additions and 8 deletions
|
@ -2,7 +2,6 @@ package notification
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"crypto/tls"
|
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"html"
|
"html"
|
||||||
|
@ -60,13 +59,7 @@ func (s *telegramSender) Send(event domain.NotificationEvent, payload domain.Not
|
||||||
req.Header.Set("Content-Type", "application/json")
|
req.Header.Set("Content-Type", "application/json")
|
||||||
//req.Header.Set("User-Agent", "autobrr")
|
//req.Header.Set("User-Agent", "autobrr")
|
||||||
|
|
||||||
t := &http.Transport{
|
client := http.Client{Timeout: 30 * time.Second}
|
||||||
TLSClientConfig: &tls.Config{
|
|
||||||
InsecureSkipVerify: true,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
client := http.Client{Transport: t, Timeout: 30 * time.Second}
|
|
||||||
res, err := client.Do(req)
|
res, err := client.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
s.log.Error().Err(err).Msgf("telegram client request error: %v", event)
|
s.log.Error().Err(err).Msgf("telegram client request error: %v", event)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue