Does anyone have some hints on how to configure a ...
# server
c
Does anyone have some hints on how to configure a server(JETTY) to require SSL in http4k?🆘
d
http4k doesn't come with support for configuring this type of thing out of the box, but falls back on the APIs supplied by the server vendor. Hence, you need to implement your own version of the stock
ServerConfig
interface, using
Jetty
as an example. Here's the original: https://github.com/http4k/http4k/blob/master/http4k-server-jetty/src/main/kotlin/org/http4k/server/jetty.kt
c
Hi @dave, thanks for the answer.
So I should copy this class and edit it to my needs?
d
yep. that's the model that we recommend
the sotkc implenetations are purposely minimal
c
Any idea why I get undefined for Http4kWebSocketListener
and req.asHttp4kRequest()
After i copied the class
d
ah - it's probably because that class is internal...
c
So I should also copy the internal classes?
d
for the moment yes - I'll make them non-internal for the next release.
c
Nice, thank you so much Dave
d
that's a good spot - thanks
np 🙂
c
Is really nice to get some help
Have a nice weekend
Hi Dave, hope you had a good week-end. I managed to copy that class and use it and even send the certificate forward to the client. But I can’t find a way to block client requests that have no certificate and read the certificate in the requests.
Any ideas/hints?