mirror of
https://github.com/fergalmoran/podnoms.git
synced 2026-01-01 14:19:09 +00:00
Added SSL to Kestrel API server
This commit is contained in:
@@ -2,27 +2,26 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace PodNoms.Api
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
BuildWebHost(args).Run();
|
||||
namespace PodNoms.Api {
|
||||
public class Program {
|
||||
public static void Main (string[] args) {
|
||||
BuildWebHost (args).Run ();
|
||||
}
|
||||
public static IWebHost BuildWebHost(string[] args) =>
|
||||
WebHost.CreateDefaultBuilder(args)
|
||||
.UseStartup<Startup>()
|
||||
.UseKestrel(options =>
|
||||
{
|
||||
options.Limits.MaxRequestBodySize = 1073741824;
|
||||
})
|
||||
.Build();
|
||||
public static IWebHost BuildWebHost (string[] args) =>
|
||||
WebHost.CreateDefaultBuilder (args)
|
||||
.UseStartup<Startup> ()
|
||||
.UseKestrel (options => {
|
||||
options.Listen (IPAddress.Any, 5000, listenOptions =>
|
||||
listenOptions.UseHttps ("localhost.pfx"));
|
||||
options.Limits.MaxRequestBodySize = 1073741824;
|
||||
})
|
||||
.Build ();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user