-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Description
Describe the bug
When using server.https
set to true, subsequently passing the --https
CLI flag to vite
causes a ERR_SSL_VERSION_OR_CIPHER_MISMATCH when trying to load the page served by the dev server. Reloading the page does not have any effect on the issue.
The reproduction steps are listed below, additionally, the reproduction stackblitz link with the project set up as stated below also errors out in an odd way.
- npm create vite
- react
- typescript
- Add
{
server: { https: true }
}
to vite.config.ts
In package.json, under scripts, dev, pass --https
to vite.
The above reproduces with both https: true
, and a custom SSL cert and key file https: { key: ..., cert: ...}
. I ran into this issue when I was resurrecting an older project that I hadn't visited for a few months - I had a specific cert and key file, but was also passing --https in my startup script. This suggests that this is a regression, and that this scenario was working at some point with vite 3.x.
Reproduction
https://stackblitz.com/edit/vitejs-vite-8esgks?file=package.json,vite.config.ts&terminal=dev
System Info
System:
OS: Windows 10 10.0.19043
CPU: (12) x64 AMD Ryzen 5 3600 6-Core Processor
Memory: 1.94 GB / 15.95 GB
Binaries:
Node: 16.13.2 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.4 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 7.19.1 - ~\AppData\Roaming\npm\npm.CMD
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (105.0.1343.27)
Used Package Manager
yarn
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.