Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change localhost to process.env.HOST for client requests #3839

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

lmiklosko
Copy link

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 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.

To-Dos

  • Successful build yarn build
  • Translation keys yarn i18n:extract

Issues Fixed or Closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Client does not adhere to HOST environment variable
1 participant