Open paulGeoghegan opened 10 months ago
As a workaround you can set the ORIGIN, PROTOCOL_HEADER and HOST_HEADER environment variables:
#.env
ORIGIN=http://localhost:3000
PROTOCOL_HEADER=x-forwarded-proto
HOST_HEADER=x-forwarded-host
I'll try this out but do you know why this is happening?
No, sorry, I hadn't time to dig around.
Okay so I tried it out but it didn't work. I currently have the following in my .env file:
ORIGIN=http://localhost:8080
PROTOCOL_HEADER=x-forwarded-proto
HOST_HEADER=x-forwarded-host
I'm still getting the same error and despite using port 8080 in the .env file it still says the following after running bun run start in the build directory:
$ bun ./index.js
Listening on 0.0.0.0:3000
These two things are unrelated. The ORIGIN
env just tells sveltekit what the base domain of your app is. It does not configure your port.
This did indeed fix the problem once I changed it to localhost:3000 in my .env file. Thanks so much! This definitely should be fixed properly but I'm glad there was a workaround.
What version of Bun is running?
1.0.21+837cbd60d
What platform is your computer?
Oficial docker image
What steps can reproduce the bug?
I have been experiencing a bug where after I run:
The server will start on 0.0.0.0:3000 but when I go to localhost:3000 I get the following error:
I tried the same thing using the node adapter and did not face the same problem so it seems like this is an issue with BUN or it's adapter. This also worked perfectly fine up I think version 1.0.20.
What is the expected behavior?
No response
What do you see instead?
No response
Additional information
No response