From c0d8e591a6bdcf7898286fe577059d7e595339c2 Mon Sep 17 00:00:00 2001 From: "michael.stevenson" Date: Tue, 14 Sep 2021 16:02:29 +0100 Subject: [PATCH] Added auth and Cors --- de-institutions-api/Startup.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/de-institutions-api/Startup.cs b/de-institutions-api/Startup.cs index 3fb8005..8004c48 100644 --- a/de-institutions-api/Startup.cs +++ b/de-institutions-api/Startup.cs @@ -153,9 +153,13 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IService app.UseHttpsRedirection(); app.UseRouting(); - + app.UseAuthentication(); app.UseAuthorization(); + app.UseCors(builder => builder + .AllowAnyMethod() + .AllowAnyHeader()); + app.UseEndpoints(endpoints => { endpoints.MapControllers();