Skip to content

Commit 0fedf01

Browse files
committed
treat base URLs with trailing slash as valid, fixes #1056
1 parent cd14b60 commit 0fedf01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/synapse/matrix.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const splitMxid = mxid => {
88
return re.exec(mxid)?.groups;
99
};
1010

11-
export const isValidBaseUrl = baseUrl => /^(http|https):\/\/[a-zA-Z0-9\-.]+(:\d{1,5})?$/.test(baseUrl);
11+
export const isValidBaseUrl = baseUrl => /^(http|https):\/\/[a-zA-Z0-9\-.]+(:\d{1,5})?\/?$/.test(baseUrl);
1212

1313
/**
1414
* Resolve the homeserver URL using the well-known lookup

0 commit comments

Comments
 (0)