-
-
Notifications
You must be signed in to change notification settings - Fork 122
Open
Description
With the current way the address is resolved, all API calls that start with a / will be resolved to the root of the host, completely ignoring any path that was specified and also pathPrefix option.
To give an example, a Portainer base path would be https://portainer.example.com/api/endpoints/1/docker/.
The call to list containers uses /containers/json as API path so the resolved request path becomes https://portainer.example.com/containers/json which is incorrect.
It should instead be https://portainer.example.com/api/endpoints/1/docker/containers/json.
A simple fix would be to strip the leading slash of the API path call:
address = url.resolve(address, options.path.startsWith('/') ? options.path.substring(1) : options.path);
tonivj-mgd, tonivj5 and nickalie
Metadata
Metadata
Assignees
Labels
No labels