Skip to content

Commit

Permalink
Add IsLocalhost to config/domain
Browse files Browse the repository at this point in the history
  • Loading branch information
benpate committed Mar 26, 2024
1 parent 53bd0b6 commit 6c83274
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions config/domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package config

import (
"github.com/EmissarySocial/emissary/tools/random"
"github.com/benpate/domain"
"go.mongodb.org/mongo-driver/bson/primitive"
)

Expand Down Expand Up @@ -31,6 +32,11 @@ func NewDomain() Domain {
}

// ID returns the domain ID.
func (domain Domain) ID() string {
return domain.DomainID
func (d Domain) ID() string {
return d.DomainID
}

// IsLocalhost returns TRUE if this domain is a localhost domain.
func (d Domain) IsLocalhost() bool {
return domain.IsLocalhost(d.Hostname)
}

0 comments on commit 6c83274

Please sign in to comment.