Don't challenge ACME when host rule on another entry point
This commit is contained in:
parent
0c76a8ac89
commit
7033b996c6
1 changed files with 12 additions and 0 deletions
|
@ -323,12 +323,24 @@ func (p *Provider) initAccount() (*Account, error) {
|
||||||
return p.account, nil
|
return p.account, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func contains(entryPoints []string, acmeEntryPoint string) bool {
|
||||||
|
for _, entryPoint := range entryPoints {
|
||||||
|
if entryPoint == acmeEntryPoint {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
func (p *Provider) watchNewDomains() {
|
func (p *Provider) watchNewDomains() {
|
||||||
p.pool.Go(func(stop chan bool) {
|
p.pool.Go(func(stop chan bool) {
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case config := <-p.configFromListenerChan:
|
case config := <-p.configFromListenerChan:
|
||||||
for _, frontend := range config.Frontends {
|
for _, frontend := range config.Frontends {
|
||||||
|
if !contains(frontend.EntryPoints, p.EntryPoint) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
for _, route := range frontend.Routes {
|
for _, route := range frontend.Routes {
|
||||||
domainRules := rules.Rules{}
|
domainRules := rules.Rules{}
|
||||||
domains, err := domainRules.ParseDomains(route.Rule)
|
domains, err := domainRules.ParseDomains(route.Rule)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue