Commit Graph

2 Commits

Author SHA1 Message Date
shirosaki-hana
1a2e44f9ae Update Generate Certificate.sh 2025-03-20 16:38:53 +09:00
shirosaki-hana
f4d3f40ce5 Add HTTPS support for RisuAI Node.js hosting version
The Node.js hosting version of RisuAI previously used simple app.listen for server execution, which didn't support native HTTPS. This caused several functionality issues due to browser security restrictions when accessing RisuAI externally, such as realm loading failures and inability to insert prompt presets.

The updated code now checks for certificate files named server.key and server.crt in the /server/node/ssl/certificate directory. If found, the server will start using HTTPS.

The /ssl directory includes a script to generate a self-signed SSL certificate using OpenSSL. To use it, add the server's public IP to the [ alt_names ] section in server.conf before generating the certificate. The CA certificate should be installed on the operating system or browser of devices remotely accessing RisuAI.

For production use with a domain, it's recommended to use a certificate from an official Certificate Authority.
2025-03-20 15:40:11 +09:00