mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-06 10:21:05 +02:00
fix mux router
This commit is contained in:
parent
99b13dc85f
commit
f458f39132
1 changed files with 3 additions and 3 deletions
|
@ -62,7 +62,7 @@ type Server struct {
|
||||||
metricsMgr *config.MetricsManager
|
metricsMgr *config.MetricsManager
|
||||||
reproxy *reproxy.Handler
|
reproxy *reproxy.Handler
|
||||||
|
|
||||||
httpRouter *atomicutil.Value[http.Handler]
|
httpRouter *atomicutil.Value[*mux.Router]
|
||||||
authenticateSvc Service
|
authenticateSvc Service
|
||||||
proxySvc Service
|
proxySvc Service
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ func NewServer(cfg *config.Config, metricsMgr *config.MetricsManager, eventsMgr
|
||||||
currentConfig: atomicutil.NewValue(versionedConfig{
|
currentConfig: atomicutil.NewValue(versionedConfig{
|
||||||
Config: cfg,
|
Config: cfg,
|
||||||
}),
|
}),
|
||||||
httpRouter: atomicutil.NewValue(http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {}))),
|
httpRouter: atomicutil.NewValue(mux.NewRouter()),
|
||||||
}
|
}
|
||||||
|
|
||||||
var err error
|
var err error
|
||||||
|
@ -296,6 +296,6 @@ func (srv *Server) updateRouter(cfg *config.Config) error {
|
||||||
if srv.proxySvc != nil {
|
if srv.proxySvc != nil {
|
||||||
srv.proxySvc.Mount(httpRouter)
|
srv.proxySvc.Mount(httpRouter)
|
||||||
}
|
}
|
||||||
srv.httpRouter.Store(http.Handler(httpRouter))
|
srv.httpRouter.Store(httpRouter)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue