Skip to content
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.

How to activate SSL support? #24

Answered by jchristn
BartSar asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, there are two constructors for this:

public Webserver(string hostname, int port, Func<HttpContext, Task> defaultRoute, X509Certificate2 sslCertificate = null)

In this one, setting sslCertificate will enable SSL.

The second:

public Webserver(string hostname, int port, bool ssl, string pfxCertFilename, string pfxCertPassword, Func<HttpContext, Task> defaultRoute)

Setting ssl to true will enable SSL.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by BartSar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants