plane icon indicating copy to clipboard operation
plane copied to clipboard

[bug]: setup.sh always uses http://, which breaks things when trying to host the API over https.

Open Chris-Greaves opened this issue 1 year ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Current behavior

When you run setup.sh my.domain.dev it'll add the NEXT_PUBLIC_API_BASE_URL variable into the .env file.


echo -e "\nNEXT_PUBLIC_API_BASE_URL=http://$1"  >> ./apps/app/.env

As you can see, it forces http with no option for https. Some top-level domains (like, .dev) require all traffic to go across https, which this breaks. I noticed it was doing this when I got mine hosted and I couldn't log in due to the following error. image

Steps to reproduce

  1. Run the setup.sh script
  2. Build the images using docker compose build
  3. Host the frontend and backend on https domains
  4. Try and log in

Browser

Google Chrome

Version

Self-hosted

Chris-Greaves avatar Apr 25 '23 03:04 Chris-Greaves

Experiencing this problem as well

thedaringdev avatar Jun 07 '23 03:06 thedaringdev

Hi, this will be fixed in the upcoming release (already on develop branch).

pablohashescobar avatar Jun 07 '23 03:06 pablohashescobar

Hello @Chris-Greaves! We're pleased to inform you that the issue you reported has been successfully resolved in the new ./setup.sh script. The updated version now requires the protocol as well when executing the command. You can use ./setup.sh https|http://<IP|Domain> for proper configuration. We would appreciate it if you could test this new setup and let us know if you encounter any further difficulties. If the issue persists or if you have any additional concerns, please don't hesitate to reopen the issue. We're here to assist you further. Thank you for your patience and cooperation!

pablohashescobar avatar Jun 10 '23 08:06 pablohashescobar