-
-
Notifications
You must be signed in to change notification settings - Fork 679
added a warning log , for well_known_server_name,well_known_server_name when they dont have prefix #3205
Conversation
…dont have http || https prefix
clientapi/routing/routing.go
Outdated
@@ -129,6 +129,10 @@ func Setup( | |||
})).Methods(http.MethodGet, http.MethodOptions) | |||
} | |||
|
|||
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.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like accidentally duplication? (as well as well_known_client_name
instead of well_known_server_name
)
Also better to put this inside the if cfg.Matrix.WellKnownClientName != "" {
block above. (same for the federation change below)
Right, updated to only check client well-known, as that's the only well-known that actually needs a http/https prefix. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #3205 +/- ##
==========================================
- Coverage 65.08% 65.08% -0.01%
==========================================
Files 508 508
Lines 57388 57392 +4
==========================================
+ Hits 37352 37353 +1
Misses 16113 16113
- Partials 3923 3926 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Thanks! |
closing this #3180
added a warning log when either well_known_server_name, well_known_server_name: dont have a prefix in them
[email protected]