vite: fix https is enabled if cert is not present
This commit is contained in:
parent
130a989185
commit
f914ada22b
1 changed files with 9 additions and 7 deletions
|
@ -88,13 +88,15 @@ export default defineConfig(({ mode }) => {
|
||||||
version(),
|
version(),
|
||||||
],
|
],
|
||||||
server: {
|
server: {
|
||||||
https: {
|
https: serverHttpCertBase
|
||||||
// This config controls https for the *dev server*.
|
? {
|
||||||
// See docs/dev-https.md for setting up https
|
// This config controls https for the *dev server*.
|
||||||
key: serverHttpCertKey,
|
// See docs/dev-https.md for setting up https
|
||||||
cert: serverHttpCertCrt,
|
key: serverHttpCertKey,
|
||||||
passphrase: serverHttpCertPassword,
|
cert: serverHttpCertCrt,
|
||||||
},
|
passphrase: serverHttpCertPassword,
|
||||||
|
}
|
||||||
|
: undefined,
|
||||||
},
|
},
|
||||||
define: {
|
define: {
|
||||||
"import.meta.env.BUILT_AT": `"${new Date().toISOString()}"`,
|
"import.meta.env.BUILT_AT": `"${new Date().toISOString()}"`,
|
||||||
|
|
Loading…
Reference in a new issue