mirror of
https://github.com/doyensec/safeurl.git
synced 2025-05-13 21:07:38 +02:00
14 lines
254 B
Go
14 lines
254 B
Go
package safeurl
|
|
|
|
import "strings"
|
|
|
|
func isSchemeAllowed(scheme string, allowedSchemes []string) bool {
|
|
scheme = strings.ToLower(scheme)
|
|
for _, allowedScheme := range allowedSchemes {
|
|
if scheme == allowedScheme {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|