Do something about invalid well-known names

This commit is contained in:
unknown 2023-09-24 20:54:51 -07:00
parent c991278e45
commit 56fbe9d62b
2 changed files with 2 additions and 2 deletions

View file

@ -129,7 +129,7 @@ func Setup(
})).Methods(http.MethodGet, http.MethodOptions) })).Methods(http.MethodGet, http.MethodOptions)
} }
if !strings.HasPrefix(string(cfg.Matrix.ServerName), "http://") && !strings.HasPrefix(string(cfg.Matrix.ServerName), "https://") { if !strings.HasPrefix(string(cfg.Matrix.ServerName), "http://") || !strings.HasPrefix(string(cfg.Matrix.ServerName), "https://") {
logrus.Warn("The well_known_server_name does not start with http:// or https:// does not start with 'http://' or 'https://'. Some clients may fail to connect.") logrus.Warn("The well_known_server_name does not start with http:// or https:// does not start with 'http://' or 'https://'. Some clients may fail to connect.")
} }

View file

@ -124,7 +124,7 @@ func Setup(
).Methods(http.MethodGet, http.MethodOptions) ).Methods(http.MethodGet, http.MethodOptions)
} }
if !strings.HasPrefix(string(cfg.Matrix.ServerName), "http://") && !strings.HasPrefix(string(cfg.Matrix.ServerName), "https://") { if !strings.HasPrefix(string(cfg.Matrix.ServerName), "http://") || !strings.HasPrefix(string(cfg.Matrix.ServerName), "https://") {
logrus.Warn("The well_known_server_name does not start with http:// or https:// does not start with 'http://' or 'https://'. Some clients may fail to connect.") logrus.Warn("The well_known_server_name does not start with http:// or https:// does not start with 'http://' or 'https://'. Some clients may fail to connect.")
} }