From 92d6d73f9c1fdd65142c3a306447015ffdff6c5d Mon Sep 17 00:00:00 2001 From: Joel Miles Date: Sat, 9 Mar 2019 22:23:30 -0600 Subject: [PATCH] Add rdp as a supported protocol in URL validation (#76) --- validation/validation.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/validation/validation.go b/validation/validation.go index f0d80964..aad5a7f7 100644 --- a/validation/validation.go +++ b/validation/validation.go @@ -14,7 +14,7 @@ import ( const defaultScheme = "http" -var supportedProtocol = [2]string{"http", "https"} +var supportedProtocols = []string{"http", "https", "rdp"} func ValidateHostname(hostname string) (string, error) { if hostname == "" { @@ -117,7 +117,7 @@ func ValidateUrl(originUrl string) (string, error) { } func validateScheme(scheme string) error { - for _, protocol := range supportedProtocol { + for _, protocol := range supportedProtocols { if scheme == protocol { return nil }