Skip to content

Plugin-admin-api - Impossibility to change the base server url (localhost) : when app deploy in production, requests fail #495

@squirrion

Description

@squirrion

Describe the bug
When the app is deployed in production, the plugin admin-api start on localhost or IP local. When we try to execute a request via the api admin (for example : http://localhost:23315/api/about, then we have a connexion failed because it doesn't use the host or IP reachable)

To Reproduce

  • Deploy on production environment the mock server api : we have kept the port 3100 for the "normal server" and configure the port 23315 for the plugin api admin (but no matter)
  • When we connect to the Mocks Server admin API url, we have in servers list : http://localhost:23315/api
  • When we try to execute for example the GET /about, a http request is generated : http://localhost:23315/api/about but failed because not reachable on WWW. If we try manually to change the localhost by the host or IP public then it's OK

Expected behavior
2 possibility :

  • Either have the possibility to control server list (config ?)
  • Or the http request must take the url referrer ?

Logs
No logs, in the network activity of the navigator (devTools), we see the request url http://localhost:23315/api/about but fail because not reachable

** Operating system, Node.js an npm versions, or browser version (please complete the following information):**

  • Browser: Chrome Version 124.0.6367.202

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions