Git Fetcher: restrain '*.git' URLs matching
This commit is contained in:
parent
8c0ce3abe8
commit
4fb04e66bd
|
@ -17,6 +17,8 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const GitScheme = "git"
|
const GitScheme = "git"
|
||||||
|
const HTTPScheme = "http"
|
||||||
|
const HTTPSScheme = "https"
|
||||||
|
|
||||||
type GitFetcher struct{}
|
type GitFetcher struct{}
|
||||||
|
|
||||||
|
@ -88,7 +90,7 @@ func (f *GitFetcher) Match(url *url.URL) bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
if strings.HasSuffix(url.Path, ".git") {
|
if (url.Scheme == HTTPSScheme || url.Scheme == HTTPScheme) && strings.HasSuffix(url.Path, ".git") {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue