fix: passing application configuration to console (#15409)

This is an update to MinIO server after swagger codegen related build
fixes added after issues introduced in 39fd7b0b3b
This commit is contained in:
Aditya Manthramurthy
2022-07-28 18:30:24 -07:00
committed by GitHub
parent bc72e4226e
commit 7ac53c07af
3 changed files with 10 additions and 4 deletions

View File

@@ -264,7 +264,7 @@ func initConsoleServer() (*restapi.Server, error) {
return nil, err
}
api := operations.NewConsoleAPI(swaggerSpec, buildOpenIDConsoleConfig())
api := operations.NewConsoleAPI(swaggerSpec)
if !serverDebugLog {
// Disable console logging if server debug log is not enabled
@@ -275,6 +275,12 @@ func initConsoleServer() (*restapi.Server, error) {
api.Logger = noLog
}
// Pass in console application config. This needs to happen before the
// ConfigureAPI() call.
restapi.GlobalMinIOConfig = restapi.MinIOConfig{
OpenIDProviders: buildOpenIDConsoleConfig(),
}
server := restapi.NewServer(api)
// register all APIs
server.ConfigureAPI()