fix: set default port 8080
This commit is contained in:
parent
d45c865f4e
commit
cdb738ca42
2
.env
2
.env
@ -22,7 +22,7 @@ PATH_TO_SAVE=
|
||||
# integer
|
||||
# (optional)
|
||||
# Specify the internal port on which the server will listen.
|
||||
INTERNAL_PORT=
|
||||
INTERNAL_PORT=8080
|
||||
|
||||
# Security
|
||||
|
||||
|
@ -16,7 +16,6 @@ using Mirea.Api.Endpoint.Middleware;
|
||||
using Mirea.Api.Security.Services;
|
||||
using System;
|
||||
using System.IO;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
|
||||
namespace Mirea.Api.Endpoint;
|
||||
|
||||
@ -67,14 +66,11 @@ public class Program
|
||||
});
|
||||
});
|
||||
|
||||
if (!string.IsNullOrEmpty(builder.Configuration.GetValue<string>("INTERNAL_PORT")))
|
||||
{
|
||||
builder.WebHost.ConfigureKestrel(options =>
|
||||
{
|
||||
options.ListenLocalhost(
|
||||
int.Parse(builder.Configuration.GetValue<string>("INTERNAL_PORT")!));
|
||||
});
|
||||
}
|
||||
|
||||
builder.Services.Configure<ForwardedHeadersOptions>(options =>
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user