From 20c0edabbfe291b7fcd278415304f9aed58c36de Mon Sep 17 00:00:00 2001 From: Bram Reyniers Date: Fri, 19 Apr 2024 08:49:31 +0200 Subject: [PATCH] only require certificates when running during development --- frontend/vite.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 39603e6d..f73aa5fb 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -6,7 +6,7 @@ import vue from "@vitejs/plugin-vue"; import fs from "fs"; import VueI18nPlugin from "@intlify/unplugin-vue-i18n/vite"; -const isTesting = process.env.NODE_ENV === 'test' +const needsCertificate = process.env.NODE_ENV === 'development' export default defineConfig({ plugins: [ @@ -22,7 +22,7 @@ export default defineConfig({ }, }, server: { - https: isTesting ? undefined : { + https: !needsCertificate ? undefined : { key: fs.readFileSync('./local-cert/localhost-key.pem'), cert: fs.readFileSync('./local-cert/localhost.pem') },