From d252d2f6dfb997292ed06d9f977b8e30c68d4ed1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miskolczi=20Rich=C3=A1rd?= Date: Mon, 22 Apr 2024 10:15:52 +0200 Subject: [PATCH] CORS policy --- WD7UVN_HFT_2023241.Endpoint/Startup.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/WD7UVN_HFT_2023241.Endpoint/Startup.cs b/WD7UVN_HFT_2023241.Endpoint/Startup.cs index daf4010..9cc03f0 100644 --- a/WD7UVN_HFT_2023241.Endpoint/Startup.cs +++ b/WD7UVN_HFT_2023241.Endpoint/Startup.cs @@ -48,6 +48,12 @@ namespace WD7UVN_HFT_2023241.Endpoint app.UseHttpsRedirection(); + app.UseCors(x => x + .AllowCredentials() + .AllowAnyMethod() + .AllowAnyHeader() + .WithOrigins("http://localhost:25415")); + app.UseRouting(); app.UseAuthorization();