Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabling SSL on node image #1007

Open
sigopa opened this issue Nov 22, 2023 · 0 comments
Open

Enabling SSL on node image #1007

sigopa opened this issue Nov 22, 2023 · 0 comments

Comments

@sigopa
Copy link

sigopa commented Nov 22, 2023

Hi

We would like to know how to enable SSL on node. The usual kestrel way like below doesn't work for node.

public class Program
{
    public static void Main(string[] args)
    {
        CreateHostBuilder(args).Build().Run();
    }
 
    public static IHostBuilder CreateHostBuilder(string[] args) =>
        Host.CreateDefaultBuilder(args)
            .ConfigureWebHostDefaults(webBuilder =>
            {
                webBuilder.UseStartup<Startup>();
                webBuilder.UseKestrel(options =>
                {
                    options.Listen(IPAddress.Any, 443, listenOptions =>
                    {
                        listenOptions.UseHttps("path_to_your_certificate.pfx", "certificate_password");
                    });
                });
            });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant