wire admin API feature flag

This commit is contained in:
2026-03-02 23:36:09 +01:00
parent 651413d494
commit 96e3b0e042
3 changed files with 13 additions and 2 deletions

View File

@@ -39,6 +39,7 @@ func main() {
"multipart_retention_hours", int(config.MultipartCleanupRetention/time.Hour),
"auth_enabled", authConfig.Enabled,
"auth_region", authConfig.Region,
"admin_api_enabled", config.AdminAPIEnabled,
)
if err := os.MkdirAll(config.DataPath, 0o755); err != nil {
@@ -72,7 +73,7 @@ func main() {
return
}
handler := api.NewHandler(objectService, logger, logConfig, authService)
handler := api.NewHandler(objectService, logger, logConfig, authService, config.AdminAPIEnabled)
addr := config.Address + ":" + strconv.Itoa(config.Port)
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)