1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 16:23:44 +00:00

only perpend http if there is no protocol

This commit is contained in:
Kyle Spearrin
2018-03-05 22:15:22 -05:00
parent cca9c3c561
commit 859f44db43

View File

@@ -191,7 +191,7 @@
function fixUri(uri) { function fixUri(uri) {
uri = uri.toLowerCase().trim(); uri = uri.toLowerCase().trim();
if (!uri.startsWith('http') && uri.indexOf('.') >= 0) { if (uri.indexOf('://') === -1 && uri.indexOf('.') >= 0) {
uri = 'http://' + uri; uri = 'http://' + uri;
} }