Change API to be able to work externaly
This commit is contained in:
@@ -10,7 +10,7 @@ using FaKrosnoMappingProfile = FaKrosnoEfDataModel.MappingProfile;
|
||||
using SytelineSaAppMappingProfile = SytelineSaAppEfDataModel.MappingProfile;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
var configuration = builder.Configuration;
|
||||
// Add services to the container.
|
||||
builder.Services.AddDbContext<FaKrosnoDbContext>(options =>
|
||||
options.UseSqlServer(builder.Configuration.GetConnectionString("FaKrosnoConnection")));
|
||||
@@ -56,6 +56,8 @@ builder.Services.AddScoped<ICustomerOrderService, CustomerOrderService>();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
app.Urls.Add(configuration.GetValue<string>("Host:Urls"));
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
//if (app.Environment.IsDevelopment())
|
||||
//{
|
||||
|
||||
@@ -14,5 +14,7 @@
|
||||
"Issuer": "FaKrosnoApi",
|
||||
"Audience": "FaKrosnoClient"
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
"Host": {
|
||||
"Urls": "http://0.0.0.0:5000"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user