Skip to content

Commit

Permalink
https
Browse files Browse the repository at this point in the history
  • Loading branch information
laolaolulu committed Nov 24, 2022
1 parent 772c6ab commit 7359c85
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
8 changes: 6 additions & 2 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
using System.Reflection;

var builder = WebApplication.CreateBuilder(args);

builder.WebHost.UseKestrel(options =>
{
options.ListenAnyIP(54321, l =>
l.UseHttps(builder.Configuration["Certificates:Path"], builder.Configuration["Certificates:Password"]));
});
// Add services to the container.

builder.Services.AddControllers();
Expand All @@ -29,7 +33,7 @@
var app = builder.Build();
if (app.Environment.IsDevelopment())
{

}

app.UseSwagger();
Expand Down
7 changes: 6 additions & 1 deletion appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,10 @@
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
"AllowedHosts": "*",
//ssl证书配置
"Certificates": {
"Path": "lp.p12",
"Password": "changeit"
}
}
Binary file added lp.p12
Binary file not shown.
Binary file added wwwroot/Faces/8/1669283041894.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7359c85

Please sign in to comment.