Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some API calls use a different endpoint #304

Open
avivace opened this issue Jul 5, 2022 · 0 comments
Open

Some API calls use a different endpoint #304

avivace opened this issue Jul 5, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@avivace
Copy link
Member

avivace commented Jul 5, 2022

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

  • We started by installing InvenioRDM following the "local installation"
  • We modified invenio.cfg as follows:
SITE_UI_URL = "https://<PUBLIC_IP>"
SITE_API_URL = "https://<PUBLIC_IP>/api"
APP_ALLOWED_HOSTS = [<PUBLIC_IP>, '0.0.0.0', 'localhost']

  • 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.

@avivace avivace added the bug Something isn't working label Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant