Temporarily fixes CORS header issue while logging in
This commit is contained in:
1 parent
2e8830b9d3
commit
d9e27bfaf1
1 file changed
+6
-1
@@ -3,7 +3,12 @@ import cons from '../state/cons';
|
||||
import { getBaseUrl } from '../../util/matrixUtil';
|
||||
|
||||
async function login(username, homeserver, password) {
|
||||
const baseUrl = await getBaseUrl(homeserver);
|
||||
let baseUrl = null;
|
||||
try {
|
||||
baseUrl = await getBaseUrl(homeserver);
|
||||
} catch (e) {
|
||||
baseUrl = `https://${homeserver}`;
|
||||
}
|
||||
|
||||
if (typeof baseUrl === 'undefined') throw new Error('Homeserver not found');
|
||||
|
||||
|
||||
Reference in new issue
Block a user