diff --git a/web/vite.config.ts b/web/vite.config.ts index cffaabd..1dc0319 100644 --- a/web/vite.config.ts +++ b/web/vite.config.ts @@ -1,9 +1,20 @@ import { defineConfig } from "vite"; +import fs from "node:fs"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const rootDir = path.resolve(__dirname, "../.."); +const httpsConfig = { + key: fs.readFileSync(path.join(rootDir, "certs/localhost+2-key.pem")), + cert: fs.readFileSync(path.join(rootDir, "certs/localhost+2.pem")) +}; export default defineConfig({ server: { port: 5174, strictPort: true, + https: httpsConfig, proxy: { "/api": "http://127.0.0.1:3001", "/storage": "http://127.0.0.1:3001"