SimonDanisch / Bonito.jl

Serving JS to the browser
MIT License
204 stars 29 forks source link

add support for secure connections #222

Closed bjarthur closed 4 months ago

bjarthur commented 4 months ago

closes https://github.com/SimonDanisch/Bonito.jl/issues/220

with these changes, an HTTPS protocol is possible with:

sslconfig = MbedTLS.SSLConfig(<path-to-SSL-certificate-file>,<path-to-SSL-key-file>)
Bonito.Server(main, url, port, sslconfig=sslconfig)

however! more work is needed, as the URL to assets still uses "http://", and so they fail to load. somehow the protocol kwarg here needs to know if SSL is being used. not sure yet how to do that...

SimonDanisch commented 4 months ago

however! more work is needed, as the URL to assets still uses "http://", and so they fail to load. somehow the protocol kwarg here needs to know if SSL is being used. not sure yet how to do that...

As far as I can tell, you solved this right?

bjarthur commented 4 months ago

yes! i force pushed some changes yesterday that use https when an sslconfig is passed in. seems to work so far.

SimonDanisch commented 4 months ago

Thanks!