mirror of
https://github.com/bitwarden/browser.git
synced 2025-03-12 13:39:14 +01:00
Modified response to include port if exists
This commit is contained in:
parent
7561f6dcb5
commit
58ba1ce5b6
@ -157,7 +157,13 @@ export class Utils {
|
|||||||
static getHostname(uriString: string): string {
|
static getHostname(uriString: string): string {
|
||||||
const url = Utils.getUrl(uriString);
|
const url = Utils.getUrl(uriString);
|
||||||
try {
|
try {
|
||||||
return url != null && url.hostname !== '' ? url.hostname : null;
|
let hostname = url != null && url.hostname !== '' ? url.hostname : null;
|
||||||
|
|
||||||
|
if(hostname != null && url.port !== '') {
|
||||||
|
hostname += ":" + url.port;
|
||||||
|
}
|
||||||
|
|
||||||
|
return hostname;
|
||||||
} catch {
|
} catch {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user