inveniosoftware / invenio-cli

CLI module for Invenio
https://invenio-cli.readthedocs.io
MIT License
10 stars 43 forks source link

Some API calls use a different endpoint #304

Open avivace opened 2 years ago

avivace commented 2 years ago

Me and @carmenmarcos00 noticed a quite strange bug while trying to deploy InvenioRDM on VM on a custom host:

- InvenioRDM is started with

invenio-cli run --host 0.0.0.0


(this is actually wrong, but it's for the purpose of triggering the bug)

InvenioRDM is then accessible on `https://<PUBLIC_IP>` and every api call from the frontend seems to be working (so it seems to be using `SITE_API_URL` from invenio.cfg`)

However, some features (e.g. Publishing a Draft) trigger some API calls that are executed against `0.0.0.0` (so ignoring what we set in `invenio.cfg`), obviously failing with a generic errors (because the browser is not being executed from the VM itself), while the others are against <PUBLIC_IP>.

I'm sure this also involves the main codebase and not only the cli one, but needs more investigating.