strapi / nextjs-corporate-starter

Strapi Demo application for Corporate Websites using Next.js
MIT License
966 stars 287 forks source link

fix(.env.example): change 0.0.0.0 to localhost to allow ipv6 #3

Closed mnzaki closed 1 year ago

mnzaki commented 1 year ago

The default of 0.0.0.0 for HOST can cause issues on machines that have IPV6 configured, as typically localhost is bound to ::1 and when a listening socket is opened it automatically listens on the IPV4 address 127.0.0.1. This causes an issue for example if another application tries to access the strapi server as "localhost:1337" which will get resolved to the IPV6 ::1 but strapi isn't listening :(

derrickmehaffy commented 1 year ago

Yeah it's a known issue on Macs since Apple in their inf wisdom changed localhost to use the ipv6 localhost by default

mnzaki commented 1 year ago

Well it's also an issue on my Arch linux with ipv6, mdns6, tailscaled and systemd-networkd... gotta support ipv6 at some point :P

derrickmehaffy commented 1 year ago

Well it's also an issue on my Arch linux with ipv6, mdns6, tailscaled and systemd-networkd... gotta support ipv6 at some point :P

I agree for local networks but within a LAN (especially localhost) using the ipv4 format should still be the default.