scotty icon indicating copy to clipboard operation
scotty copied to clipboard

[RFC] Support TLS out of the box

Open friedbrice opened this issue 3 years ago • 3 comments

Is there a reason that TLS is shunted off to its own package and isn't supported out of the box?

friedbrice avatar Nov 20 '22 17:11 friedbrice

FWIW I haven't felt a desperate need because it's just a matter of calling warp-tls on top of scottyApp, and in most cases handling TLS is a reverse proxy's responsibility. However, I don't strongly object to adding a function that launch a server with TLS

fumieval avatar Nov 21 '22 06:11 fumieval

in most cases handling TLS is a reverse proxy's responsibility

This is a compelling point to me, yeah.

it's just a matter of calling warp-tls on top of scottyApp

This is a less-compelling point to me, since I typically think that Scotty users shouldn't have to know all that much about Warp, that Scotty should be taking care of that for them. I'm of the opinion that users shouldn't have to add warp as an explicit dependency in order to use the fully functionality that Scotty offers.

friedbrice avatar Nov 21 '22 16:11 friedbrice

Indeed, given that scotty supports WAI middlewares via the middleware function, perhaps there should be a function to enable TLS in the same vein

fumieval avatar Nov 22 '22 03:11 fumieval