Skip to content

Commit 9c5bb2b

Browse files
committed
Added support for gopher URLs.
1 parent 404f348 commit 9c5bb2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/validation/helpers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func isLoopbackIP(ip string) bool {
4444
// IsValidURL checks if URL is valid
4545
func IsValidURL(uri string) bool {
4646
if u, err := url.ParseRequestURI(uri); err != nil ||
47-
(u.Scheme != "http" && u.Scheme != "https") ||
47+
(u.Scheme != "http" && u.Scheme != "https" && u.Scheme != "gopher") ||
4848
!validPort(portOnly(u.Host)) {
4949
return false
5050
}

0 commit comments

Comments
 (0)