File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,13 @@ import type { IConfigOptions } from "matrix-react-sdk/src/IConfigOptions";
21
21
export async function getVectorConfig ( relativeLocation = "" ) : Promise < IConfigOptions | undefined > {
22
22
if ( relativeLocation !== "" && ! relativeLocation . endsWith ( "/" ) ) relativeLocation += "/" ;
23
23
24
- const specificConfigPromise = getConfig ( `${ relativeLocation } config.${ window . location . hostname } .json` ) ;
24
+ // Handle trailing dot FQDNs
25
+ let domain = window . location . hostname . trimEnd ( ) ;
26
+ if ( domain [ domain . length - 1 ] === "." ) {
27
+ domain = domain . slice ( 0 , - 1 ) ;
28
+ }
29
+
30
+ const specificConfigPromise = getConfig ( `${ relativeLocation } config.${ domain } .json` ) ;
25
31
const generalConfigPromise = getConfig ( relativeLocation + "config.json" ) ;
26
32
27
33
try {
You can’t perform that action at this time.
0 commit comments