diff --git a/api/api.go b/api/api.go index 6341bbcf..661fe031 100644 --- a/api/api.go +++ b/api/api.go @@ -100,7 +100,7 @@ func (a *API) GetGlobalConfig(_ context.Context, group *v1.Group) (*structpb.Str // GetPluginConfig returns the plugin configuration of the GatewayD. func (a *API) GetPluginConfig(context.Context, *emptypb.Empty) (*structpb.Struct, error) { - jsonData, err := json.Marshal(a.Config.PluginKoanf.All()) + jsonData, err := json.Marshal(a.Config.Plugin) if err != nil { metrics.APIRequestsErrors.WithLabelValues( "GET", "/v1/GatewayDPluginService/GetPluginConfig", codes.Internal.String(), diff --git a/api/http_server.go b/api/http_server.go index 4e533ddb..6f05b911 100644 --- a/api/http_server.go +++ b/api/http_server.go @@ -50,16 +50,12 @@ func (s *HTTPServer) Shutdown(ctx context.Context) { // CreateHTTPAPI creates a new HTTP API. func createHTTPAPI(options *Options) *http.Server { - ctx := context.Background() - ctx, cancel := context.WithCancel(ctx) - defer cancel() - // Register gRPC server endpoint // TODO: Make this configurable with TLS and Auth. rmux := runtime.NewServeMux() opts := []grpc.DialOption{grpc.WithTransportCredentials(insecure.NewCredentials())} err := v1.RegisterGatewayDAdminAPIServiceHandlerFromEndpoint( - ctx, rmux, options.GRPCAddress, opts) + context.Background(), rmux, options.GRPCAddress, opts) if err != nil { options.Logger.Err(err).Msg("failed to start HTTP API") }