1
0
mirror of https://github.com/doyensec/safeurl.git synced 2025-05-13 21:07:38 +02:00
safeurl/host.go
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
}