Is it possible, in development env, to run SvelteKit app with https?I tried to run
npm run dev -- --https
and vite starts the server successfully:
VITE v3.0.2 ready in 359 ms➜ Local: https://localhost:5173/➜ Network: [...]
but i can't connect to https://localhost:5173chrome says: ERR_SSL_VERSION_OR_CIPHER_MISMATCH
I also tried to edit vite.config.js adding my certificate:
https: { key: readFileSync( `${__dirname}/../server/key.pem`), cert: readFileSync(`${__dirname}/../server/cert.pem`),}
and i also tried to use mkcert() following this post:
but it results in the same error
then I tried to use mkcert as plugin:
const config = { server: { https: true }, plugins: [sveltekit(), mkcert()],};
this time, on first load, it seemed to work, but loading other pages with SvelteKit goto() led to the following different error:
TypeError [ERR_HTTP2_INVALID_CONNECTION_HEADERS]: HTTP/1 Connection specific headers are forbidden: "keep-alive"