From d3f93dbaaf8532630a7ee430f392f66e42d0ed79 Mon Sep 17 00:00:00 2001 From: Marcus Ferl Date: Sun, 9 Jul 2023 13:13:31 +0200 Subject: [PATCH] Enabled CORS --- Weiferl.Api/Program.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Weiferl.Api/Program.cs b/Weiferl.Api/Program.cs index 6e820fc..c8d267d 100644 --- a/Weiferl.Api/Program.cs +++ b/Weiferl.Api/Program.cs @@ -21,6 +21,13 @@ app.UseHttpsRedirection(); app.UseAuthorization(); +app.UseCors(builder => +{ + builder.AllowAnyOrigin() + .AllowAnyMethod() + .AllowAnyHeader(); +}); + app.MapControllers(); //app.Run("http://192.168.0.57:3045"); //Linux Server