Skip to content

Commit

Permalink
set default protocol to https
Browse files Browse the repository at this point in the history
  • Loading branch information
pod4g committed Jun 7, 2018
1 parent c6d2a59 commit 5005e92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ module.exports = class Util {
static urlNormalize (url) {
if (!url) return ''
if (url.startsWith('//')) {
return `http:${url}`
return `https:${url}`
}
if (!/^https?:\/\//.test(url)) {
return `http://${url}`
return `https://${url}`
}
return url
}
Expand Down

0 comments on commit 5005e92

Please sign in to comment.