projects
/
rainny.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e8830b
)
Temporarily fixes CORS header issue while logging in
author
unknown
<ajbura@gmail.com>
Thu, 29 Jul 2021 08:23:50 +0000
(13:53 +0530)
committer
unknown
<ajbura@gmail.com>
Thu, 29 Jul 2021 08:23:50 +0000
(13:53 +0530)
src/client/action/auth.js
patch
|
blob
|
history
diff --git
a/src/client/action/auth.js
b/src/client/action/auth.js
index 170fb4b720a7ca29a97b4b8489f1a1c7772e2a05..0403ec9f481af392feea198857cc885688945d26 100644
(file)
--- a/
src/client/action/auth.js
+++ b/
src/client/action/auth.js
@@
-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');