conflict resolution

This commit is contained in:
Reginald Cherenfant Jasmin
2023-12-07 01:45:26 -05:00
29 changed files with 613 additions and 62 deletions

View File

@ -5,13 +5,18 @@ using Microsoft.EntityFrameworkCore;
using System.Reflection;
var builder = WebApplication.CreateBuilder(args);
// CORS setup to allow requests from any origin.
builder.Services.AddCors(p => p.AddPolicy("DamageAppCorsPolicy", build => {
build.WithOrigins("*").AllowAnyMethod().AllowAnyHeader().AllowAnyOrigin();
}));
// Add services to the container.
// Add controller services and API Explorer for endpoint discovery.
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
//builder.Services.AddSwaggerGen();
// Add Swagger/OpenAPI documentation support.
builder.Services.AddSwaggerGen(c =>
{
// Include XML comments from your assembly
@ -46,7 +51,14 @@ if (app.Environment.IsDevelopment())
regionProvider.SeedData();
}
}
<<<<<<< HEAD
app.UseCors("DamageAppCorsPolicy");
=======
// Enable CORS, authentication, and authorization middleware.
app.UseCors("DamageAppCorsPolicy");
>>>>>>> 9ec9b8b96fc7c5767fcddf1e4e52bde203fcf619
app.UseAuthorization();
app.MapControllers();