mirror of
https://github.com/doyensec/safeurl.git
synced 2025-06-30 22:23:57 +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
|
||
|
}
|