mirror of
https://github.com/traefik/traefik.git
synced 2025-09-26 08:11:15 +02:00
Fix acme checkOnDemandDomain
Signed-off-by: Emile Vauge <emile@vauge.com>
This commit is contained in:
parent
1eeba34806
commit
24d3a698a0
@ -299,7 +299,10 @@ func (server *Server) createTLSConfig(entryPointName string, tlsOption *TLS, rou
|
|||||||
if _, ok := server.serverEntryPoints[server.globalConfiguration.ACME.EntryPoint]; ok {
|
if _, ok := server.serverEntryPoints[server.globalConfiguration.ACME.EntryPoint]; ok {
|
||||||
if entryPointName == server.globalConfiguration.ACME.EntryPoint {
|
if entryPointName == server.globalConfiguration.ACME.EntryPoint {
|
||||||
checkOnDemandDomain := func(domain string) bool {
|
checkOnDemandDomain := func(domain string) bool {
|
||||||
if router.GetHandler().Match(&http.Request{URL: &url.URL{}, Host: domain}, &mux.RouteMatch{}) {
|
routeMatch := &mux.RouteMatch{}
|
||||||
|
router := router.GetHandler()
|
||||||
|
match := router.Match(&http.Request{URL: &url.URL{}, Host: domain}, routeMatch)
|
||||||
|
if match && routeMatch.Route != nil {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user