1
0
mirror of https://github.com/doyensec/safeurl.git synced 2025-07-11 14:30:18 +02:00
Files
safeurl/host.go
Viktor Chuchurski 4b6083ba90 - initial code commit
2022-12-12 17:55:37 +01:00

13 lines
235 B
Go

package safeurl
import "strings"
func isAllowedHost(host string, allowedHosts []string) bool {
host = strings.ToLower(host)
for _, allowedHost := range allowedHosts {
if host == allowedHost {
return true
}
}
return false
}