Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if (isWorkerMode) {
if (isMainModule) {
const start = async (): Promise<void> => {
try {
await app.listen({host: '0.0.0.0', port});
await app.listen({host: '::', port});
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: IPv6-Only Bind Breaks IPv4-Only Environments

Changing the listen host from '0.0.0.0' to '::' breaks compatibility with IPv4-only systems and environments without IPv6 support. While '::' works on IPv6-enabled systems (and often accepts IPv4 connections via IPv4-mapped IPv6 addresses on dual-stack systems), it will fail on systems where IPv6 is disabled or not supported, making the application unable to start in those environments. This is a breaking change that trades fixing IPv6-only platforms (like Fly) at the cost of breaking IPv4-only deployments.

Fix in Cursor Fix in Web

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not realise it would break on non-IPv6 environments, my apologies, I guess there could be an env var set to enable IPv6 support

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @icepcp — I'd welcome a PR that uses an environment variable for the host 👍

} catch (err) {
// Use app.log if available, otherwise fallback to console
if (app && app.log) {
Expand Down