mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-25 03:16:44 +00:00
User Agent do not contain bridge version, only client in format
This commit is contained in:
committed by
James Houlahan
parent
1d49a484a8
commit
984b28e8f9
@ -31,7 +31,6 @@ import (
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/ProtonMail/proton-bridge/pkg/pmapi"
|
||||
"github.com/ProtonMail/proton-bridge/pkg/sentry"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
@ -60,9 +59,7 @@ var logCrashRgx = regexp.MustCompile("^v.*_crash_.*\\.log$") //nolint[gochecknog
|
||||
func HandlePanic(cfg *Config, output string) {
|
||||
if !cfg.IsDevMode() {
|
||||
apiCfg := cfg.GetAPIConfig()
|
||||
clientID := apiCfg.ClientID
|
||||
appVersion := apiCfg.AppVersion
|
||||
if err := sentry.ReportSentryCrash(clientID, appVersion, pmapi.CurrentUserAgent, errors.New(output)); err != nil {
|
||||
if err := sentry.ReportSentryCrash(apiCfg.ClientID, apiCfg.AppVersion, apiCfg.UserAgent, errors.New(output)); err != nil {
|
||||
log.Error("Sentry crash report failed: ", err)
|
||||
}
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ func (c *Config) GetRoundTripper(cm *pmapi.ClientManager, listener listener.List
|
||||
|
||||
// We want any pin mismatches to be communicated back to bridge GUI and reported.
|
||||
pinningDialer.SetTLSIssueNotifier(func() { listener.Emit(events.TLSCertIssue, "") })
|
||||
pinningDialer.EnableRemoteTLSIssueReporting(c.GetAPIConfig().AppVersion)
|
||||
pinningDialer.EnableRemoteTLSIssueReporting(c.GetAPIConfig().AppVersion, c.GetAPIConfig().UserAgent)
|
||||
|
||||
// We wrap the pinning dialer in a layer which adds "alternative routing" feature.
|
||||
proxyDialer := pmapi.NewProxyTLSDialer(pinningDialer, cm)
|
||||
|
||||
Reference in New Issue
Block a user