Fixed logic error

This commit is contained in:
2025-07-12 22:55:56 +02:00
parent dd85ea5e29
commit a884a2734d

View File

@@ -70,7 +70,7 @@ if (IsDevelopment || useSwagger)
app.UseSwaggerUI();
//app.UseElmahExceptionPage(); // Messes with JSON response for API calls. Leaving this here so I don't accidentally put this in again later on.
}
if (UseMiddleware == true || IsDevelopment)
if (UseMiddleware == true && !IsDevelopment)
{
app.UseMiddleware<ApiKeyMiddleware>();
}