{
  "Logging": {
    "LogLevel": {
      "Default": "Debug",
      "System": "Information",
      "Microsoft": "Information"
    }
  },
  "Host": {
    "Port": 5200
  }
}
    

var config = new ConfigurationBuilder()  

    .SetBasePath(Directory.GetCurrentDirectory())  

    .AddJsonFile("appsettings.json", optional: false)  

    .Build();  

  

var webHost =  WebHost.CreateDefaultBuilder(args)  

    .UseUrls($"http://localhost:{config.GetValue<int>("Host:Port")}")  

    .UseKestrel()  

    .UseStartup<Startup>();  

 

 

app.UseForwardedHeaders(new ForwardedHeadersOptions
{
    ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
});

app.UseAuthorization();

Posted by 명혀니
,