@sveltejs/kit 1.0.0-next.246 → 1.0.0-next.247

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2669,14 +2669,6 @@ async function dev({ cwd, port, host, https, config }) {
2669
2669
  merged_config.server.https = https;
2670
2670
  }
2671
2671
 
2672
- // by default, when enabling HTTPS in Vite, it also enables HTTP/2
2673
- // however, node-fetch's Request implementation does not like the HTTP/2 headers
2674
- // we set a no-op proxy config to force Vite to downgrade to TLS-only
2675
- // see https://vitejs.dev/config/#server-https
2676
- if (merged_config.server.https && !merged_config.server.proxy) {
2677
- merged_config.server.proxy = {};
2678
- }
2679
-
2680
2672
  if (port) {
2681
2673
  merged_config.server.port = port;
2682
2674
  }
package/dist/cli.js CHANGED
@@ -986,7 +986,7 @@ async function launch(port, https) {
986
986
  exec(`${cmd} ${https ? 'https' : 'http'}://localhost:${port}`);
987
987
  }
988
988
 
989
- const prog = sade('svelte-kit').version('1.0.0-next.246');
989
+ const prog = sade('svelte-kit').version('1.0.0-next.247');
990
990
 
991
991
  prog
992
992
  .command('dev')
@@ -1138,7 +1138,7 @@ async function check_port(port) {
1138
1138
  function welcome({ port, host, https, open, loose, allow, cwd }) {
1139
1139
  if (open) launch(port, https);
1140
1140
 
1141
- console.log($.bold().cyan(`\n SvelteKit v${'1.0.0-next.246'}\n`));
1141
+ console.log($.bold().cyan(`\n SvelteKit v${'1.0.0-next.247'}\n`));
1142
1142
 
1143
1143
  const protocol = https ? 'https:' : 'http:';
1144
1144
  const exposed = typeof host !== 'undefined' && host !== 'localhost' && host !== '127.0.0.1';
package/dist/node.js CHANGED
@@ -52,9 +52,19 @@ function get_raw_body(req) {
52
52
 
53
53
  /** @type {import('@sveltejs/kit/node').GetRequest} */
54
54
  async function getRequest(base, req) {
55
+ let headers = /** @type {Record<string, string>} */ (req.headers);
56
+ if (req.httpVersionMajor === 2) {
57
+ // we need to strip out the HTTP/2 pseudo-headers because node-fetch's
58
+ // Request implementation doesn't like them
59
+ headers = Object.assign({}, headers);
60
+ delete headers[':method'];
61
+ delete headers[':path'];
62
+ delete headers[':authority'];
63
+ delete headers[':scheme'];
64
+ }
55
65
  return new Request(base + req.url, {
56
66
  method: req.method,
57
- headers: /** @type {Record<string, string>} */ (req.headers),
67
+ headers,
58
68
  body: await get_raw_body(req) // TODO stream rather than buffer
59
69
  });
60
70
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltejs/kit",
3
- "version": "1.0.0-next.246",
3
+ "version": "1.0.0-next.247",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/sveltejs/kit",