webui-dev / go-webui

Use any web browser as GUI, with Go in the backend and modern web technologies in the frontend.
https://webui.me/
MIT License
170 stars 14 forks source link

Add webui tls support #36

Closed ttytm closed 4 months ago

ttytm commented 4 months ago

Will allow to enable tls. E.g.:

# ...go-webui/v2/examples
go run -tags webui_tls ./minimal.go
hassandraga commented 4 months ago

Thank you @ttytm. For other wrappers that use pre-built lib, I'm trying to add TLS pre-built to GitHub CI.

hassandraga commented 4 months ago

I noticed that you completely removed the TLS API from the non encrypted version of webui. Probably I should do something similar in mainstream.

ttytm commented 4 months ago

Yeah, it has little use when running WebUI without TLS enabled. Having it available only then might make it quicker to spot what is wrong when trying to use it without TLS.

ttytm commented 4 months ago

I noticed that you completely removed the TLS API from the non encrypted version of webui. Probably I should do something similar in mainstream.

Thinking about it, since not all languages allow for conditional compilation it might compilacte things for some wrappers when making it the same on the mainstream.

hassandraga commented 4 months ago

Yes, that's why I keep it in the non-secure version of the library. But I noticed in this issue that the user may using non-secure version so that's why TLS API always returns false... so I change it to exit with a critical error assert to let the developer knows what's going on.