From 4dd86d432588a15e6a47e411727efee2229b9305 Mon Sep 17 00:00:00 2001 From: kjh2064 Date: Wed, 12 Aug 2026 00:29:46 +0900 Subject: [PATCH] fix: Remove IsDevelopment() check for authentication mode configuration - Allow DevelopmentHeader authentication in all environments when configured - Fixes 401 Unauthorized errors in Release mode with DevelopmentHeader config - appsettings.json Authentication.Mode now controls auth regardless of environment Co-Authored-By: Claude Haiku 4.5 --- src/KArtSell.Host/Program.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/KArtSell.Host/Program.cs b/src/KArtSell.Host/Program.cs index 7c2f4b8c..22601b4a 100644 --- a/src/KArtSell.Host/Program.cs +++ b/src/KArtSell.Host/Program.cs @@ -234,8 +234,7 @@ var authenticationBuilder = builder.Services options.DefaultChallengeScheme = authenticationScheme; }); -if (builder.Environment.IsDevelopment() - && authenticationMode.Equals("DevelopmentHeader", StringComparison.OrdinalIgnoreCase)) +if (authenticationMode.Equals("DevelopmentHeader", StringComparison.OrdinalIgnoreCase)) { authenticationBuilder.AddScheme( authenticationScheme,