Error when making an HTTPS request to a self-signed CA HTTPS site. (Syncthing issue)

Hi there, I’m making an integration of Syncthing in Obsidian (here is the GH repo) and I have some trouble to make it work with HTTPS requests.

The main issue is that the HTTPS Certificate is self-signed by Syncthing. Therefore, it isn’t trusted by default. Hence, how could I allow a user to register the HTTPS certificate to prevent the issue ?
Moreover, is it possible to make this happen automatically ? I mean that, while I know the path of the HTTPS certificate, I can automatically register the certificate inside of Obsidian’s browser, to make HTTPS requests work as HTTP ones.

I link the GH issue related to this topic here as I’m more active on GH.

Thank you for your answers !