mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 00:39: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 (
|
||||
"bytes"
|
||||
"crypto/tls"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"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("User-Agent", "autobrr")
|
||||
|
||||
t := &http.Transport{
|
||||
TLSClientConfig: &tls.Config{
|
||||
InsecureSkipVerify: true,
|
||||
},
|
||||
}
|
||||
|
||||
client := http.Client{Transport: t, Timeout: 30 * time.Second}
|
||||
client := http.Client{Timeout: 30 * time.Second}
|
||||
res, err := client.Do(req)
|
||||
if err != nil {
|
||||
s.log.Error().Err(err).Msgf("telegram client request error: %v", event)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue