Enabling SSL
After installation install mkcert certificate into your system by running the command below:
mkcert -install
Now we need to create a certificate.
To create a certificate run command below:
> mkcert localhost 127.0.0.1
Created a new certificate valid for the following names 📜
- "localhost"
- "127.0.0.1"
The certificate is at "./localhost+1.pem" and the key at "./localhost+1-key.pem" ✅
It will expire on 13 May 2023 🗓
Now we have all files that we need for CMA config.
Add to your
cma.js
file field ssl
with the following object:module.export = {
... other configuration
ssl: {
enabled: true,
ssl_certificate: './localhost+1.pem',
ssl_certificate_key: './localhost+1-key.pem'
}
}
You can run only one application with SSL enabled at the time because it will use port 443 which is the default port for SSL.
Last modified 2yr ago