solid-start icon indicating copy to clipboard operation
solid-start copied to clipboard

how to use https on localhost

Open harxki opened this issue 3 years ago • 0 comments

I want to use https on local, so i create key and cert with using mkcert. I rewrite vite.config.js as follows to use https on the local host, but an error occurred.

export default defineConfig({
  plugins: [solid()],
  server: {
    https: {
      key: fs.readFileSync("./scripts/key.pem"),
      cert: fs.readFileSync("./scripts/cert.pem"),
    },
  },
});

// error
ERROR TypeError [ERR_INVALID_HTTP_TOKEN]: Header name must be a valid HTTP token [":method"]

Is it possible to develop using https in solid-start?

harxki avatar Jun 18 '22 14:06 harxki