Polyrific-Inc / Playground-Core

The Playground app with dotnet core
0 stars 3 forks source link

Set https redirection port #11

Closed affand closed 6 years ago

affand commented 6 years ago

The app use UseHttpsRedirection() to enforce https. However no https port for redirect specified. So we need to add one in Startup.cs

services.AddHttpsRedirection(options =>
            {
                options.RedirectStatusCode = StatusCodes.Status307TemporaryRedirect;
                options.HttpsPort = 5001;
            });
frandi commented 6 years ago

AFAIK, explicit Https port declaration is optional because ASP.Net Core will smartly provide the port for us. If we want to customize the port, I prefer to do it via env var ASPNETCORE_HTTPS_PORT.