Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

added a warning log , for well_known_server_name,well_known_server_name when they dont have prefix #3205

Merged
merged 8 commits into from
Nov 25, 2023

Conversation

Mothergoose31
Copy link
Contributor

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]

@Mothergoose31 Mothergoose31 requested a review from a team as a code owner September 25, 2023 04:00
@@ -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.")
Copy link
Contributor

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)

@S7evinK
Copy link
Contributor

S7evinK commented Nov 25, 2023

Right, updated to only check client well-known, as that's the only well-known that actually needs a http/https prefix.

@S7evinK S7evinK enabled auto-merge (squash) November 25, 2023 20:01
Copy link

codecov bot commented Nov 25, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (210bce9) 65.08% compared to head (972c51d) 65.08%.
Report is 1 commits behind head on main.

Files Patch % Lines
setup/config/config_global.go 25.00% 2 Missing and 1 partial ⚠️
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     
Flag Coverage Δ
unittests 49.73% <25.00%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@S7evinK S7evinK disabled auto-merge November 25, 2023 20:17
@S7evinK S7evinK merged commit fd11e65 into matrix-org:main Nov 25, 2023
18 of 20 checks passed
@S7evinK
Copy link
Contributor

S7evinK commented Nov 25, 2023

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants