svenstaro/miniserve

Suggestion: optional HTTPS

mosajjal opened this issue · 8 comments

Hi,

I've been using this product quite often and it's doing a great job (thank you!). It'd be nice to have HTTPS support with both automatically generated self-signed certificate or cert/key file as input.

Cheers,

Hi,

I've been using this product quite often and it's doing a great job (thank you!). It'd be nice to have HTTPS support with both automatically generated self-signed certificate or cert/key file as input.

Cheers,

Why not simply use a reverse proxy server such nginx so that the complexity (and the weight) of the software does not increase too much? Recall the principles of modularity: "Do one thing and do it well".

The reason is actually of technical nature and spec nature as for HTTP2 and HTTP3 to work, we need to have end-to-end HTTPS going or otherwise we'd be going against spec from what I understand.

@giovannikraushaar what you said makes sense but I use miniserve as part of my "standalone" toolbelt (without any config files etc). And having a service offering TLS to miniserve seems a bit redundant. To you formula (which I think is excellent), my suggestion would be to interprate that into the design of TLS inside miniserve, ie TLS as a "middleware" rather than embedded in the logic.

@svenstaro I'd be interested to see how can we manage to add an optional TLS layer on top of our TCP so the development of the actual project doesn't get distracted by that layer. Although granted this is a "nice to have", I'm looking forward to discuss this more :)

I've solved this problem really neatly in other actix-web based projects so don't worry about it. I'll just have to get to it.

Related to #18

I'd be much interested in this feature too !
Cheers,

Closing as duplicate of #18 (which is now solved).