mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
1600e0f7da
* [CI] Add wsl linter * Implement wsl recommendations Co-authored-by: Clément Michaud <clement.michaud34@gmail.com>
16 lines
326 B
Go
16 lines
326 B
Go
package authorization
|
|
|
|
import "strings"
|
|
|
|
func isDomainMatching(domain string, domainRules []string) bool {
|
|
for _, domainRule := range domainRules {
|
|
if domain == domainRule {
|
|
return true
|
|
} else if strings.HasPrefix(domainRule, "*.") && strings.HasSuffix(domain, domainRule[1:]) {
|
|
return true
|
|
}
|
|
}
|
|
|
|
return false
|
|
}
|