|
|
@ -17,7 +17,9 @@ |
|
|
|
package cmd |
|
|
|
package cmd |
|
|
|
|
|
|
|
|
|
|
|
import ( |
|
|
|
import ( |
|
|
|
|
|
|
|
"context" |
|
|
|
"fmt" |
|
|
|
"fmt" |
|
|
|
|
|
|
|
"net" |
|
|
|
"net/url" |
|
|
|
"net/url" |
|
|
|
"os" |
|
|
|
"os" |
|
|
|
"os/signal" |
|
|
|
"os/signal" |
|
|
@ -196,6 +198,9 @@ func StartGateway(ctx *cli.Context, gw Gateway) { |
|
|
|
|
|
|
|
|
|
|
|
httpServer := xhttp.NewServer([]string{globalCLIContext.Addr}, |
|
|
|
httpServer := xhttp.NewServer([]string{globalCLIContext.Addr}, |
|
|
|
criticalErrorHandler{registerHandlers(router, globalHandlers...)}, getCert) |
|
|
|
criticalErrorHandler{registerHandlers(router, globalHandlers...)}, getCert) |
|
|
|
|
|
|
|
httpServer.BaseContext = func(listener net.Listener) context.Context { |
|
|
|
|
|
|
|
return GlobalContext |
|
|
|
|
|
|
|
} |
|
|
|
go func() { |
|
|
|
go func() { |
|
|
|
globalHTTPServerErrorCh <- httpServer.Start() |
|
|
|
globalHTTPServerErrorCh <- httpServer.Start() |
|
|
|
}() |
|
|
|
}() |
|
|
|