dyne / zenpub

Reflow federated economic network
GNU Affero General Public License v3.0
13 stars 3 forks source link

User profile image URL contains 'localhost' in path URL #50

Closed viktorsmari closed 3 years ago

viktorsmari commented 3 years ago

Users profile images are not loading. They are uploading to the API, but the URL is incorrect.

Browser console error: GET http://localhost/uploads/01EXKGV554X3ZHQ707WQRPT178/2021-03-03_21-23-30.png net::ERR_CONNECTION_REFUSED

If we query the API, we see it returns the url with the http://localhost in front "url": "http://localhost/uploads/01EYJR67EAYVWRW5Z87HNGN16X/IOT.jpg"

If we replace the front of the URL with the correct path, it works. https://api.reflowproject.eu/uploads/01EYJR67EAYVWRW5Z87HNGN16X/IOT.jpg <-- Works

2021-03-09_14-41-56

Expected behavior

mayel commented 3 years ago

This is probably a misconfiguration on the backend, where localhost needs to be replaced by the domain in env/config file.

viktorsmari commented 3 years ago

Now after the latest config changes on the staging server, it tries to load this URL after uploading an image: https://95.217.212.123/api/explore/uploads/01EXKGV554X3ZHQ707WQRPT178/prof2.jpg <-- Won't work

When it should be loading: https://api.reflowproject.eu/uploads/01EXKGV554X3ZHQ707WQRPT178/prof2.jpg <-- Works

viktorsmari commented 3 years ago

Fixed by config update!