diff options
| author | ivar <i@oiee.no> | 2025-10-26 22:59:26 +0100 |
|---|---|---|
| committer | ivar <i@oiee.no> | 2025-10-26 22:59:26 +0100 |
| commit | 091580f15a6a0b7a1bc5ed004d9253b36eeb4753 (patch) | |
| tree | 5990cbba0b3e4621bbcf54320bbdcab9f93188b8 /api/WhatApi | |
| parent | e4fb2a3c493cca456f1515bdaad39499eafc3348 (diff) | |
| download | what-091580f15a6a0b7a1bc5ed004d9253b36eeb4753.tar.xz what-091580f15a6a0b7a1bc5ed004d9253b36eeb4753.zip | |
Only log sensitive data logs in dev
Diffstat (limited to 'api/WhatApi')
| -rw-r--r-- | api/WhatApi/Program.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/api/WhatApi/Program.cs b/api/WhatApi/Program.cs index 27ceaf9..823402d 100644 --- a/api/WhatApi/Program.cs +++ b/api/WhatApi/Program.cs @@ -18,7 +18,8 @@ public partial class Program builder.Services.AddHttpContextAccessor(); builder.Services.AddDbContextPool<Database>(b => { - b.EnableSensitiveDataLogging(); + if (builder.Environment.IsDevelopment()) + b.EnableSensitiveDataLogging(); b.UseNpgsql(builder.Configuration.GetConnectionString("Master"), o => o.UseNetTopologySuite()); }); |
