Reputation: 671
We just switched our quasar dev environment to use https instead of http. The problem now is that we need to configure SSL so that we don't need to continue to an unsafe site, and so that hot reloads work without having to kill quasar and start over. (Having to restart pretty much kills the value of using dev mode, which is otherwise great!) I read some help at: https://quasar.dev/quasar-cli-vite/developing-pwa/handling-service-worker#ssl-certificate that shows that I should configure:
devServer: {
https: {
// Use ABSOLUTE paths or fileURLToPath(new URL('./root/relative/path', import.meta.url))
// https://nodejs.org/api/https.html#https_https_createserver_options_requestlistener
key: "/path/to/server.key",
pfx: "/path/to/server.pfx",
cert: "/path/to/server.crt",
ca: "/path/to/ca.pem",
passphrase: 'vite-dev-server' // do you need it?
}
}
The advice gives some directions on how to create a local CA cert and certificates for the server, but I want to use my actual certificates that I use for access to my main project host. We use Quasar to access our client app, but there is a main server app that we access over httpd through Apache. The Apache config for our SSL has:
SSLCertificateFile /etc/pki/tls/certs/ucx.crt
SSLCertificateKeyFile /etc/pki/tls/private/ucx.key
SSLCertificateChainFile /etc/pki/tls/certs/myhost.net.ca-bundle.crt
I'm not familiar with the ins and outs of SSL certificates. What do I need to do to configure Quasar to use the above files for my quasar dev security? Do I need to convert some of them to pem files? How? Do I need to break up the chain file, which I think contains a rootCA as well? How? Then after playing with these files in whatever way is necessary, what do I configure in the Quasar.config.js?
I also have a vite.config.js in the home directory, but I'm not sure it's in use because the one flag that it defines is the one that I get a warning about as an unconfigured Feature flag.
Greatly appreciate any clear solution.
Upvotes: 0
Views: 66