From fe0bdf136c29a6b858798018df14c624fe47533c Mon Sep 17 00:00:00 2001 From: moreal Date: Tue, 10 Sep 2024 09:30:36 +0900 Subject: [PATCH] Check `Jwt`-related configuration is null --- NineChronicles.Headless/GraphTypes/StandaloneSubscription.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NineChronicles.Headless/GraphTypes/StandaloneSubscription.cs b/NineChronicles.Headless/GraphTypes/StandaloneSubscription.cs index af0600912..4ab19cf5b 100644 --- a/NineChronicles.Headless/GraphTypes/StandaloneSubscription.cs +++ b/NineChronicles.Headless/GraphTypes/StandaloneSubscription.cs @@ -114,7 +114,7 @@ public StandaloneSubscription(StandaloneContext standaloneContext, IConfiguratio { StandaloneContext = standaloneContext; Configuration = configuration; - if (Convert.ToBoolean(configuration.GetSection("Jwt")["EnableJwtAuthentication"])) + if (configuration.GetSection("Jwt")["EnableJwtAuthentication"] is { } enableJwtAuthentication && Convert.ToBoolean(enableJwtAuthentication)) { this.AuthorizeWith(GraphQLService.JwtPolicyKey); }