Allow HTTP/2 and HTTP/3

This commit is contained in:
Thorsten Sommer 2024-08-29 13:30:54 +02:00
parent 9f41062cb4
commit 67726a91d4
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108
2 changed files with 16 additions and 2 deletions

View File

@ -2,6 +2,7 @@ using AIStudio.Agents;
using AIStudio.Settings;
using AIStudio.Tools.Services;
using Microsoft.AspNetCore.Server.Kestrel.Core;
using Microsoft.Extensions.Logging.Console;
using MudBlazor.Services;
@ -54,6 +55,19 @@ internal sealed class Program
var secretKeySalt = Convert.FromBase64String(secretKeySaltEncoded);
var builder = WebApplication.CreateBuilder();
builder.WebHost.ConfigureKestrel(kestrelServerOptions =>
{
kestrelServerOptions.ConfigureEndpointDefaults(listenOptions =>
{
listenOptions.Protocols = HttpProtocols.Http1AndHttp2AndHttp3;
});
kestrelServerOptions.ConfigureHttpsDefaults(adapterOptions =>
{
});
});
builder.Logging.ClearProviders();
builder.Logging.SetMinimumLevel(LogLevel.Debug);
builder.Logging.AddFilter("Microsoft", LogLevel.Information);

View File

@ -19,7 +19,7 @@ tokio = { version = "1.39", features = ["rt", "rt-multi-thread", "macros"] }
flexi_logger = "0.28"
log = { version = "0.4", features = ["kv"] }
once_cell = "1.19.0"
rocket = { version = "0.5", default-features = false, features = ["json"] }
rocket = { version = "0.5", features = ["json"] }
rand = "0.8"
rand_chacha = "0.3.1"
base64 = "0.22.1"