Set sentry scheme to http if no scheme available

This commit is contained in:
Abin Simon
2022-04-29 15:10:19 +05:30
parent 8e5e36b6cf
commit 5c7776b12e
+2 -9
View File
@@ -233,16 +233,9 @@ func prepareConfig(config *Config) error {
return fmt.Errorf("invalid scheme %s", config.Scheme)
}
if config.Scheme == "" && strings.HasPrefix(config.Addr, "localhost") {
config.Scheme = schemeHTTP
}
if config.Scheme == "" && strings.Index(config.Addr, "rafay.local") > 0 {
config.Scheme = schemeHTTP
}
if config.Scheme == "" {
return fmt.Errorf("empty Schema not allowed")
_log.Debug("scheme not defined, defaulting to http")
config.Scheme = schemeHTTP
}
switch config.Mode {