-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Description
Describe the bug
May be related to #3566
Using a custom server with adapter-node's handler.js to serve over HTTP/2 causes the reported hostname in URLs to be undefined.
Reproduction
Repo: https://github.com/aradalvand/sveltekit-adapter-node-http2-repro
Clone, run pnpm install, then pnpm run build, and finally node server.js (remember to use the custom server.js, don't run node build).
Then send a request to https://localhost:3000/test:
Check server logs (the related console.log is in src/routes/test/+server.js)::

Notice that the host, hostname and so on are undefined; they should obviously be localhost.
Logs
No response
System Info
System:
OS: Linux 5.10 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish)
CPU: (4) x64 Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
Memory: 17.05 GB / 18.67 GB
Container: Yes
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.12.1 - /usr/bin/node
Yarn: 1.22.19 - /usr/bin/yarn
npm: 9.3.0 - /usr/bin/npm
npmPackages:
@sveltejs/adapter-node: ^1.2.4 => 1.2.4
@sveltejs/kit: ^1.5.0 => 1.20.4
svelte: ^3.54.0 => 3.59.1
vite: ^4.3.0 => 4.3.9Severity
blocking an upgrade
Additional Information
No response
astrrr and ardakod
Metadata
Metadata
Assignees
Labels
No labels
