Shelf frontend unable to login/create account due to CORS restrictions
jamiejcole opened this issue · 4 comments
Fresh install with the docker-compose file, all that's changed is:
- The default
8000
port to8002
as Portainer was using8000
already - The
shelf-data
volume location to a mounted hdd. - The
API_BASE_URL
was changed fromlocalhost
to the LAN IP of the docker host.
These issues pop up in the Chrome console:
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,
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