Server side loads the IP address to bind the socket to from environment variable HOST, but client side expects the API to always be on localhost. This generally works, but when you have IPv6 capable server and trying to bind to IPv4 port (e.g. HOST=127.0.0.1), this does not work as client side has hardcoded localhost instead of using process.env.HOST. As IPv6 takes priority over v4, localhost resolves to ::1 resulting in internal server error.
This fix replaces all occurrences of api calls from localhost:PORT to HOST:PORT.
Description
Server side loads the IP address to bind the socket to from environment variable
HOST
, but client side expects the API to always be on localhost. This generally works, but when you have IPv6 capable server and trying to bind to IPv4 port (e.g. HOST=127.0.0.1), this does not work as client side has hardcodedlocalhost
instead of usingprocess.env.HOST
. As IPv6 takes priority over v4, localhost resolves to ::1 resulting in internal server error.This fix replaces all occurrences of api calls from localhost:PORT to HOST:PORT.
To-Dos
yarn build
yarn i18n:extract
Issues Fixed or Closed