Added: Bug Fixes
This commit is contained in:
@@ -29,6 +29,8 @@ var handlerProviders = map[handler.Type]Provider{
|
||||
// It iterates over the module configurations, retrieves appropriate handler providers,
|
||||
// and registers the handlers with the HTTP multiplexer.
|
||||
func Register(ctx context.Context, mCfgs []Config, mux *http.ServeMux, mgr handler.PluginManager) error {
|
||||
mux.Handle("/health", http.HandlerFunc(handler.HealthHandler))
|
||||
|
||||
log.Debugf(ctx, "Registering modules with config: %#v", mCfgs)
|
||||
// Iterate over the handlers in the configuration.
|
||||
for _, c := range mCfgs {
|
||||
@@ -79,4 +81,4 @@ func moduleCtxMiddleware(moduleName string, next http.Handler) http.Handler {
|
||||
ctx := context.WithValue(r.Context(), model.ContextKeyModuleID, moduleName)
|
||||
next.ServeHTTP(w, r.WithContext(ctx))
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user