Add rdp as a supported protocol in URL validation (#76)

This commit is contained in:
Joel Miles 2019-03-09 22:23:30 -06:00 committed by Silver
parent 07a409ffef
commit 92d6d73f9c
1 changed files with 2 additions and 2 deletions

View File

@ -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
}