Merge branch 'main' of http://gitea.poloinformatico.it/POLO-API/ApiAdHoc_Odoo
This commit is contained in:
commit
a22d21f30c
@ -10,19 +10,21 @@ var builder = WebApplication.CreateBuilder(args);
|
||||
// Enable legacy TLS protocols (TLS 1.0/1.1)
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
|
||||
|
||||
//PORTE DEL SERVIZIO
|
||||
builder.WebHost.UseUrls("http://0.0.0.0:5000");
|
||||
|
||||
|
||||
// Add services to the container.
|
||||
builder.Services.AddControllers();
|
||||
|
||||
#region istanze dbContext
|
||||
|
||||
builder.Services.AddDbContext<PiDbContext>(options =>
|
||||
options.UseSqlServer(builder.Configuration.GetConnectionString("DefaultConnection")));
|
||||
builder.Services.AddDbContext<PiDbContext>(options =>
|
||||
options.UseSqlServer(builder.Configuration.GetConnectionString("DefaultConnection")));
|
||||
|
||||
#endregion
|
||||
|
||||
builder.Services.AddControllers();
|
||||
//builder.Services.AddControllers();
|
||||
|
||||
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
||||
builder.Services.AddEndpointsApiExplorer();
|
||||
@ -33,12 +35,12 @@ var app = builder.Build();
|
||||
// Configure the HTTP request pipeline.
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI();
|
||||
}
|
||||
|
||||
app.UseMiddleware<TokenAuthenticationController>();
|
||||
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI();
|
||||
app.UseAuthorization();
|
||||
|
||||
app.MapControllers();
|
||||
|
||||
@ -7,6 +7,6 @@
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"ConnectionStrings": {
|
||||
"DefaultConnection": "Data Source=poloinformatico15.clienti.init-s.it;Initial Catalog=AHR_PI;User Id=sa; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False; encrypt=false"
|
||||
"DefaultConnection": "Data Source=poloinformatico15.clienti.init-s.it;Initial Catalog=AHR_PI;User Id=sa; Password=p0l01nf.;Integrated Security=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False;Encrypt=False"
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user