Skip to content

Commit

Permalink
Update internal/authentication/auth.go
Browse files Browse the repository at this point in the history
Co-authored-by: Joe Julian <[email protected]>
  • Loading branch information
jr0d and joejulian authored Apr 9, 2021
1 parent 25d3c7e commit 19f1285
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions internal/authentication/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,12 @@ func (a *Authenticator) matchCookieDomains(domain string) (bool, string) {
// Remove port
p := strings.Split(domain, ":")

if a.config != nil {
for _, d := range a.config.CookieDomains {
if d.Match(p[0]) {
return true, d.Domain
}
if a.config == nil {
return false, p[0]
}
for _, d := range a.config.CookieDomains {
if d.Match(p[0]) {
return true, d.Domain
}
}
return false, p[0]
Expand Down

0 comments on commit 19f1285

Please sign in to comment.