mirror of
https://github.com/wassname/talk.git
synced 2026-07-10 23:42:05 +08:00
Allow domains with ports
This commit is contained in:
+5
-1
@@ -568,7 +568,11 @@ module.exports = class UsersService {
|
||||
}
|
||||
let redirectDomain;
|
||||
try {
|
||||
redirectDomain = url.parse(loc).hostname;
|
||||
const {hostname, port} = url.parse(loc);
|
||||
redirectDomain = hostname;
|
||||
if (port) {
|
||||
redirectDomain += `:${port}`;
|
||||
}
|
||||
} catch (e) {
|
||||
return Promise.reject('redirect location is invalid');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user