Skip to content

Commit 49d4c09

Browse files
authored
Update nuxt.config.ts
1 parent 17e93b3 commit 49d4c09

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

nuxt.config.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
1+
let https = {}
2+
if (/yes|1|on|true/i.test(`${process.env.SESAME_HTTPS_ENABLED}`)) {
3+
try {
4+
https = {
5+
key: readFileSync(`${process.env.SESAME_HTTPS_PATH_KEY}`, 'utf8'),
6+
cert: readFileSync(`${process.env.SESAME_HTTPS_PATH_CERT}`, 'utf8'),
7+
};
8+
consola.info('[Nuxt] SSL certificates loaded successfully')
9+
} catch (error) {
10+
consola.warn('[Nuxt] Error while reading SSL certificates', error)
11+
}
12+
}
13+
114
// https://nuxt.com/docs/api/configuration/nuxt-config
215
export default defineNuxtConfig({
316
compatibilityDate: '2024-04-03',
417
devtools: { enabled: true },
518
modules: ["nuxt-quasar-ui","@nuxt-alt/proxy"],
19+
devServer: {
20+
https,
21+
},
622
srcDir: "src",
723
proxy: {
824
https: false,

0 commit comments

Comments
 (0)