unmade / shelf-showcase

An example of Shelf Cloud ready-to-run docker-compose

Home Page:https://getshelf.cloud

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shelf frontend unable to login/create account due to CORS restrictions

jamiejcole opened this issue · comments

Fresh install with the docker-compose file, all that's changed is:

  1. The default 8000 port to 8002 as Portainer was using 8000 already
  2. The shelf-data volume location to a mounted hdd.
  3. The API_BASE_URL was changed from localhost to the LAN IP of the docker host.

These issues pop up in the Chrome console:

image

These are the docker logs:

shelf-edgedb-1        | INFO 1 2022-11-10T04:45:26.666 edb.server: Connection discarded to backend database: __edgedbsys__
shelf-edgedb-1        | INFO 1 2022-11-10T04:47:26.697 edb.server: Connection discarded to backend database: edgedb
shelf-edgedb-1        | INFO 1 2022-11-10T04:47:27.699 edb.server: Backend connections to database edgedb: 1 were discarded in at least the last 1.0 seconds.

If I leave the API_BASE_URL as localhost as seen above, the Chrome console logs a different issue,
image

Thanks

I am seeing the "ERR_CONNECTION_REFUSED" issue you're describing above as well.

I was able to get mine working. I updated the docker-compose.yml API_BASE_URL from localhost to the LAN IP of my docker host and I also updated the .shelf-back.env CORS_ALLOW_ORIGINS from localhost to the LAN IP of my docker host. Everything seems happy.

I was able to get mine working. I updated the docker-compose.yml API_BASE_URL from localhost to the LAN IP of my docker host and I also updated the .shelf-back.env CORS_ALLOW_ORIGINS from localhost to the LAN IP of my docker host. Everything seems happy.

Can confirm this works thanks @mshorey

I'm a little bit late with reply, but thank you guys for trying!

I'll add the solution to README.md and make the CORS_ALLOW_ORIGINS less strict, so it won't be an issue in the future