Compare commits

...

1 Commits

Author SHA1 Message Date
kjh2064 4dd86d4325 fix: Remove IsDevelopment() check for authentication mode configuration
deploy / deploy (push) Successful in 1m47s
deploy / notify (push) Successful in 0s
- 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 <noreply@anthropic.com>
2026-08-12 00:29:46 +09:00
+1 -2
View File
@@ -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<AuthenticationSchemeOptions, DevelopmentHeaderAuthenticationHandler>(
authenticationScheme,