Skip to content

Commit

Permalink
Fix acme checkOnDemandDomain
Browse files Browse the repository at this point in the history
Signed-off-by: Emile Vauge <emile@vauge.com>
  • Loading branch information
emilevauge committed Jul 11, 2016
1 parent 8f8f72f commit cb66f29
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,9 @@ func (server *Server) createTLSConfig(entryPointName string, tlsOption *TLS, rou
if _, ok := server.serverEntryPoints[server.globalConfiguration.ACME.EntryPoint]; ok {
if entryPointName == server.globalConfiguration.ACME.EntryPoint {
checkOnDemandDomain := func(domain string) bool {
if router.GetHandler().Match(&http.Request{URL: &url.URL{}, Host: domain}, &mux.RouteMatch{}) {
routeMatch := &mux.RouteMatch{}
router := router.GetHandler()
if router.Match(&http.Request{URL: &url.URL{}, Host: domain}, routeMatch) && routeMatch.Route != nil {
return true
}
return false
Expand Down

0 comments on commit cb66f29

Please sign in to comment.