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