Skip to content

Commit

Permalink
Added support for gopher URLs.
Browse files Browse the repository at this point in the history
  • Loading branch information
4y8 committed Feb 19, 2021
1 parent 404f348 commit 9c5bb2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/validation/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func isLoopbackIP(ip string) bool {
// IsValidURL checks if URL is valid
func IsValidURL(uri string) bool {
if u, err := url.ParseRequestURI(uri); err != nil ||
(u.Scheme != "http" && u.Scheme != "https") ||
(u.Scheme != "http" && u.Scheme != "https" && u.Scheme != "gopher") ||
!validPort(portOnly(u.Host)) {
return false
}
Expand Down

0 comments on commit 9c5bb2b

Please sign in to comment.