From de5dc274d792804d692d6155ce9e018cffaa9f28 Mon Sep 17 00:00:00 2001 From: Polianin Nikita Date: Mon, 7 Oct 2024 01:42:00 +0300 Subject: [PATCH] build: add cors for debugging frontend --- Endpoint/Program.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Endpoint/Program.cs b/Endpoint/Program.cs index dbf26e7..90d4844 100644 --- a/Endpoint/Program.cs +++ b/Endpoint/Program.cs @@ -64,6 +64,9 @@ public class Program policy.AllowAnyMethod(); policy.AllowAnyHeader(); policy.AllowCredentials(); +#if DEBUG + policy.WithOrigins("http://localhost:4200"); +#endif }); });