Skip to content

Commit

Permalink
feat(docs): Add the missing sample code for pwa https config (#15273)
Browse files Browse the repository at this point in the history
* dosc: Add the missing sample code

* Update handling-service-worker.md

Co-authored-by: Razvan Stoenescu <[email protected]>
  • Loading branch information
dongwa and rstoenescu authored Jan 19, 2023
1 parent 4b254f7 commit be5ddbe
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,22 @@ You may notice in some dev environments, that Workbox will not load your service

When you set `devServer > https: true` in your quasar.config.js file, Quasar will instruct Vite to auto-generate a SSL certificate for you. However, if you want to create one yourself for your localhost, then check out this blog post by [Filippo](https://blog.filippo.io/mkcert-valid-https-certificates-for-localhost/). Then your `quasar.config.js > devServer > https` should look like this:

```js
// quasar.config.js

devServer: {
https: {
// Use ABSOLUTE paths or path.join(__dirname, 'root/relative/path')
// 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?
}
}
```

More info on Vite and HTTPS [here](https://vitejs.dev/config/#server-https).

## Important Hosting Configuration
Expand Down

0 comments on commit be5ddbe

Please sign in to comment.