vault backup: 2025-06-23 00:01:29

This commit is contained in:
2025-06-23 00:01:29 +03:30
parent a7f5370340
commit 8e7ad789fb
1347 changed files with 0 additions and 229 deletions
@@ -0,0 +1,45 @@
using Microsoft.AspNetCore.Authentication.Negotiate;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddControllersWithViews();
builder.Services.AddAuthentication(NegotiateDefaults.AuthenticationScheme)
.AddNegotiate();
builder.Services.AddAuthorization(options =>
{
// By default, all incoming requests will be authorized according to the default policy.
options.FallbackPolicy = options.DefaultPolicy;
});
builder.Services.AddRazorPages();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Home/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseRouting();
app.UseAuthentication();
app.UseAuthorization();
app.MapControllerRoute(
name: "default1",
pattern: "{controller}/{action=Index}/{id?}");
app.MapControllerRoute(
name: "default2",
pattern: "{controller}/{action=Index}/{id?}");
app.Run();