|
|
@ -1,5 +1,6 @@ |
|
|
|
var builder = WebApplication.CreateBuilder(args); |
|
|
|
|
|
|
|
builder.AddServiceDefaults(); |
|
|
|
builder.Services.AddSession(opt => |
|
|
|
{ |
|
|
|
opt.Cookie.Name = ".eShopWebhooks.Session"; |
|
|
@ -12,18 +13,7 @@ builder.Services.AddSession(opt => |
|
|
|
.AddMvc(); |
|
|
|
builder.Services.AddControllers(); |
|
|
|
var app = builder.Build(); |
|
|
|
|
|
|
|
var pathBase = app.Configuration["PATH_BASE"]; |
|
|
|
if (!string.IsNullOrEmpty(pathBase)) |
|
|
|
{ |
|
|
|
app.UsePathBase(pathBase); |
|
|
|
} |
|
|
|
|
|
|
|
if (!app.Environment.IsDevelopment()) |
|
|
|
{ |
|
|
|
app.UseExceptionHandler("/Error"); |
|
|
|
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
|
|
|
|
} |
|
|
|
app.UseServiceDefaults(); |
|
|
|
|
|
|
|
app.Map("/check", capp => |
|
|
|
{ |
|
|
@ -62,7 +52,6 @@ app.UseCookiePolicy(new CookiePolicyOptions { MinimumSameSitePolicy = SameSiteMo |
|
|
|
|
|
|
|
app.UseStaticFiles(); |
|
|
|
app.UseSession(); |
|
|
|
app.UseRouting(); |
|
|
|
app.UseAuthentication(); |
|
|
|
app.UseAuthorization(); |
|
|
|
app.MapDefaultControllerRoute(); |
|
|
|