1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-13 01:58:44 +02:00

add http protocol if none fiven

This commit is contained in:
Kyle Spearrin 2018-03-02 12:42:11 -05:00
parent f205a9cc9f
commit 0d80216921

View File

@ -151,6 +151,10 @@ export class UtilsService implements UtilsServiceAbstraction {
return null; return null;
} }
if (uriString.indexOf('://') === -1) {
uriString = 'http://' + uriString;
}
if (uriString.startsWith('http://') || uriString.startsWith('https://')) { if (uriString.startsWith('http://') || uriString.startsWith('https://')) {
try { try {
return new URL(uriString); return new URL(uriString);