open-eats / OpenEats

:pizza: Self Hosted Recipe Management App :hamburger:
https://open-eats.github.io/
MIT License
669 stars 102 forks source link

GET request for Recipe/News images are at 127.0.0.1:5210 #137

Closed wck0 closed 3 years ago

wck0 commented 4 years ago

I've just installed an OpenEats instance following this guide: https://github.com/open-eats/OpenEats/blob/master/docs/Running_the_App_Without_Docker.md (So, no Docker)

The site works! But when I upload an image to a Recipe or News item, the images do not display on the site. They are uploaded (I can find them on my server and manually navigate to their URLs in a browser.

Browser developer tools reveal that the GET requests for these images are sent to http://127.0.0.1:5210/... instead of my domain.

Is this because API_URL is set to 127.0.0.1:5210 in the .env files? Should it be set otherwise? Or is it something else?

wck0 commented 3 years ago

OK, so my brother-in-law (jhc142002) found the solution to this. I'm using Apache. The following needs to be in the OpenEats site config file:

ProxyPreserveHost On

Restart Apache, and image urls are correct.