【发布时间】:2022-08-02 17:29:56
【问题描述】:
是否可以在开发环境中使用 https 运行 SvelteKit 应用程序? 我试着跑
npm 运行开发 -- --https
vite 成功启动服务器:
VITE v3.0.2 ready in 359 ms
➜ Local: https://localhost:5173/
➜ Network: https://192.168.1.30:5173/
但我无法连接到 https://localhost:5173 铬说:ERR_SSL_VERSION_OR_CIPHER_MISMATCH
我还尝试编辑 vite.config.js 添加我的证书:
https: {
key: readFileSync( `${__dirname}/../server/key.pem`),
cert: readFileSync(`${__dirname}/../server/cert.pem`),
}
但它不起作用。
任何想法?
-
\"but it doesn't work\" 不是特别具体。