Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Viewing all articles
Browse latest Browse all 1541

run sveltekit dev with https

$
0
0

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:

Vite https on localhost

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"

Viewing all articles
Browse latest Browse all 1541

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>