https option not working in svelte-kit next.236
See original GitHub issueDescribe the bug
Running pnpm run dev -- --https
should serve the project at https://localhost:3000
.
Reproduction
- Create a blank svelte-kit project:
pnpm init svelte@next https-bug && cd https-bug && pnpm install
- Start the project with
https
enabled:pnpm run dev -- --https
- Open the site in the browser
https://localhost:3000
- Browser returns a 500 error (error text below)
Logs
TypeError [ERR_INVALID_HTTP_TOKEN]: Header name must be a valid HTTP token [":method"]
at file:///home/josh/Playground/svelte-kit-with-https/node_modules/.pnpm/@sveltejs+kit@1.0.0-next.236_svelte@3.46.2/node_modules/@sveltejs/kit/dist/install-fetch.js:5207:6
at Array.map (<anonymous>)
at new Headers (file:///home/josh/Playground/svelte-kit-with-https/node_modules/.pnpm/@sveltejs+kit@1.0.0-next.236_svelte@3.46.2/node_modules/@sveltejs/kit/dist/install-fetch.js:5206:12)
at new Request (file:///home/josh/Playground/svelte-kit-with-https/node_modules/.pnpm/@sveltejs+kit@1.0.0-next.236_svelte@3.46.2/node_modules/@sveltejs/kit/dist/install-fetch.js:5934:19)
at file:///home/josh/Playground/svelte-kit-with-https/node_modules/.pnpm/@sveltejs+kit@1.0.0-next.236_svelte@3.46.2/node_modules/@sveltejs/kit/dist/chunks/index.js:1984:8
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
System Info
System:
OS: Linux 5.13 Linux Mint 20.3 (Una)
CPU: (8) x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
Memory: 657.21 MB / 15.52 GB
Container: Yes
Shell: 5.0.17 - /bin/bash
Binaries:
Node: 16.4.0 - ~/.asdf/installs/nodejs/16.4.0/bin/node
Yarn: 1.22.10 - ~/.asdf/installs/nodejs/16.4.0/.npm/bin/yarn
npm: 8.3.0 - ~/.asdf/plugins/nodejs/shims/npm
Browsers:
Chrome: 97.0.4692.99
Firefox: 96.0
npmPackages:
@sveltejs/adapter-auto: next => 1.0.0-next.14
@sveltejs/kit: next => 1.0.0-next.236
svelte: ^3.44.0 => 3.46.2
Severity
blocking all usage of SvelteKit for apps that require ssl.
Additional Information
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:7
- Comments:13 (8 by maintainers)
Top Results From Across the Web
Configuration • Docs • SvelteKit
Your project's configuration lives in a svelte.config.js file at the root of your project. As well as SvelteKit, this config object is used...
Read more >Routing • Docs • SvelteKit
By default, each layout inherits the next layout above it. Sometimes that isn't what you want - in this case, advanced layouts can...
Read more >Introduction • Docs • SvelteKit
In short, it's a UI framework that compiles your components to highly optimized vanilla JavaScript. Read the introduction to Svelte blog post and...
Read more >Link options • Docs • SvelteKit
In SvelteKit, <a> elements (rather than framework-specific <Link> components) are used to navigate between the routes of your app. If the user clicks...
Read more >Page options • Docs • SvelteKit
Since this would result in unnecessary work, SvelteKit defaults to prerendering any pages it finds where prerender is not explicitly set to false...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ve opened #3553 to hopefully address this. If people could take a look at that and confirm whether that fixes their issue, that would be appreciated.
@joshnuss - I think you are correct as I can confirm in Chrome that the failed request was made via HTTP/2:
Note the h2 in the protocol column