1
0
mirror of https://github.com/S2-/gitlit synced 2025-08-03 21:00:04 +02:00

update dependencies

This commit is contained in:
s2
2018-10-09 09:51:34 +02:00
parent 4fcc873901
commit da4083f574
1112 changed files with 23205 additions and 21697 deletions

View File

@@ -26,6 +26,7 @@ var authProtocols = {
var cache = {}
module.exports.fromUrl = function (giturl, opts) {
if (typeof giturl !== 'string') return
var key = giturl + JSON.stringify(opts || {})
if (!(key in cache)) {
@@ -58,7 +59,7 @@ function fromUrl (giturl, opts) {
project = decodeURIComponent(shortcutMatch[3])
defaultRepresentation = 'shortcut'
} else {
if (parsed.host !== gitHostInfo.domain) return
if (parsed.host && parsed.host !== gitHostInfo.domain && parsed.host.replace(/^www[.]/, '') !== gitHostInfo.domain) return
if (!gitHostInfo.protocols_re.test(parsed.protocol)) return
if (!parsed.path) return
var pathmatch = gitHostInfo.pathmatch