29 lines
563 B
C#
29 lines
563 B
C#
using System.Text;
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
builder.Services.AddRazorPages();
|
|
builder.Services.AddControllers();
|
|
|
|
builder.WebHost.ConfigureKestrel(serverOptions => {
|
|
serverOptions.RequestHeaderEncodingSelector = _ => Encoding.UTF8;
|
|
serverOptions.ResponseHeaderEncodingSelector = _ => Encoding.UTF8;
|
|
});
|
|
|
|
var app = builder.Build();
|
|
|
|
if (!app.Environment.IsDevelopment()) {
|
|
app.UseExceptionHandler("/Error");
|
|
}
|
|
|
|
app.UseStaticFiles();
|
|
|
|
app.UseRouting();
|
|
|
|
app.UseAuthorization();
|
|
|
|
app.MapRazorPages();
|
|
app.MapControllers();
|
|
|
|
app.Run();
|