From 473d8e797c775743e8be3632f02a40622f9ad76a Mon Sep 17 00:00:00 2001 From: Florian Friedrich Date: Mon, 20 Nov 2023 10:51:48 +0100 Subject: [PATCH] Fix crash on startup --- server/SensorServer/Program.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/SensorServer/Program.cs b/server/SensorServer/Program.cs index 29ecab1..4434736 100644 --- a/server/SensorServer/Program.cs +++ b/server/SensorServer/Program.cs @@ -10,7 +10,12 @@ builder.Services.AddEntityFrameworkSqlite(); builder.Services.AddDbContext(); -builder.Services.AddCors(options => { options.AddDefaultPolicy(policy => policy.WithOrigins("*")); }); +builder.Services.AddHttpLogging(_ => {}); + +builder.Services.AddCors(options => +{ + options.AddDefaultPolicy(policy => policy.WithOrigins("*")); +}); builder.Services .AddAuthentication("Bearer")