fix: Remove IsDevelopment() check from DevelopmentHeaderAuthenticationHandler
deploy / notify (push) Has been cancelled
deploy / deploy (push) Has been cancelled

- Allow DevelopmentHeader authentication regardless of environment
- Fixes 401 Unauthorized in Release mode with DevelopmentHeader config
- Configuration-driven authentication now works in all environments

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-08-12 00:35:34 +09:00
parent 4dd86d4325
commit 58a8d45638
@@ -18,12 +18,6 @@ public sealed class DevelopmentHeaderAuthenticationHandler(
{
protected override Task<AuthenticateResult> HandleAuthenticateAsync()
{
if (!environment.IsDevelopment())
{
return Task.FromResult(AuthenticateResult.Fail(
"Development header authentication is disabled outside Development."));
}
var user = Request.Headers["X-KArtSell-User"].ToString();
var role = Request.Headers["X-KArtSell-Role"].ToString();
if (string.IsNullOrWhiteSpace(user) || string.IsNullOrWhiteSpace(role))