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

HTTPS / SSL #40

Open
Thorium opened this issue Dec 18, 2024 · 3 comments
Open

HTTPS / SSL #40

Thorium opened this issue Dec 18, 2024 · 3 comments
Labels
question Further information is requested

Comments

@Thorium
Copy link
Contributor

Thorium commented Dec 18, 2024

I'm trying to find example documentation on configuring Oxpecker to use HTTPS, but the documentation is a bit thin on that part.

The AspNetCore 6 documentation says:

builder.WebHost.ConfigureKestrel((context, serverOptions) =>
{
    serverOptions.Listen(IPAddress.Loopback, 5000);
    serverOptions.Listen(IPAddress.Loopback, 5001, listenOptions =>
    {
        listenOptions.UseHttps("testCert.pfx", "testPassword");
    });
});

...but there is nothing like that in .UseOxpecker(endpoints) and the Microsoft.AspNetCore.Hosting.ListenOptionsHttpsExtensions.UseHttps takes some ListenOptions which I don't know where to get.

Do I even need that, if I just bind a certificate to a port
e.g. via classic netsh http add sslcert ipport=0.0.0.0:443 certhash=(thumbprint) appid=(someGuid) ?

@Lanayx Lanayx added the question Further information is requested label Dec 18, 2024
@Lanayx
Copy link
Owner

Lanayx commented Dec 18, 2024

@Thorium Kestrel configuration is orthogonal to Oxpecker, Oxpecker is just a middleware. Any "Minimal APIs" https configuration that you find will be applicable to Oxpecker as well.

@Thorium
Copy link
Contributor Author

Thorium commented Dec 18, 2024

Thank you for the quick reply. It seems the underlying Kestrel configurations have changed around AspNetCore 6, and the internet still has a lot of old docs. I have to investigate the best practices tomorrow.

@Lanayx
Copy link
Owner

Lanayx commented Dec 18, 2024

I think something like this and below can be relevant

Or this should be applicable as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants