mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 15:23:33 +00:00
Modified response to include port if exists
This commit is contained in:
@@ -157,7 +157,13 @@ export class Utils {
|
||||
static getHostname(uriString: string): string {
|
||||
const url = Utils.getUrl(uriString);
|
||||
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 {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user