overseerr icon indicating copy to clipboard operation
overseerr copied to clipboard

Change localhost to process.env.HOST for client requests

Open lmiklosko opened this issue 1 year ago • 0 comments

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

  • [x] Successful build yarn build
  • [x] Translation keys yarn i18n:extract

Issues Fixed or Closed

  • Fixes #3838

lmiklosko avatar Apr 05 '24 21:04 lmiklosko